Add Compute source build support #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compute | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| compute_ubuntu_build: | |
| name: Build with Compute (source) on Ubuntu | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| swift_version: ["6.2"] | |
| runs-on: ubuntu-22.04 | |
| env: | |
| OPENATTRIBUTEGRAPH_WERROR: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE_BINARY: 0 | |
| OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 0 | |
| container: swift:${{ matrix.swift_version }}-jammy | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y libssl-dev | |
| # Fix SSH submodule checkout failure for git@github.com:jcmosc/swift-runtime-headers.git | |
| - name: Configure git to use HTTPS instead of SSH | |
| run: git config --global url."https://github.com/".insteadOf "git@github.com:" | |
| - uses: actions/checkout@v4 | |
| - name: Checkout Swift headers | |
| uses: ./.github/actions/checkout-swift-headers | |
| - name: Build in debug mode | |
| run: swift build -c debug -Xcc -Wno-elaborated-enum-base | |
| compute_macos_build: | |
| name: Build with Compute (binary) on macOS | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-15] | |
| xcode-version: ["16.4"] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| OPENATTRIBUTEGRAPH_WERROR: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE_BINARY: 1 | |
| OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: OpenSwiftUIProject/OpenSwiftUI/.github/actions/setup-xcode@main | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Checkout Swift headers | |
| uses: ./.github/actions/checkout-swift-headers | |
| - name: Build in debug mode | |
| run: swift build -c debug | |
| compute_ios_build: | |
| name: Build with Compute (binary) on iOS | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-15] | |
| xcode-version: ["16.4"] | |
| ios-version: ["18.5"] | |
| include: | |
| - ios-version: "18.5" | |
| ios-simulator-name: "iPhone 16 Pro" | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| OPENATTRIBUTEGRAPH_WERROR: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE_BINARY: 1 | |
| OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: OpenSwiftUIProject/OpenSwiftUI/.github/actions/setup-xcode@main | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Checkout Swift headers | |
| uses: ./.github/actions/checkout-swift-headers | |
| - name: Build in debug mode on iOS Simulator | |
| run: | | |
| xcodebuild build \ | |
| -workspace .swiftpm/xcode/package.xcworkspace \ | |
| -scheme OpenAttributeGraph-Package \ | |
| -configuration Debug \ | |
| -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ | |
| -derivedDataPath .build-debug \ | |
| -skipMacroValidation \ | |
| -skipPackagePluginValidation \ | |
| OTHER_SWIFT_FLAGS="-warnings-as-errors" |