Enable Tuist caching and build insights in CI #79
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 6.2.4 crashes swift-frontend when compiling C++ interop on Linux. | |
| # Swift 6.3.2 has been verified locally on Linux. | |
| swift_version: ["6.3.2"] | |
| runs-on: ubuntu-22.04 | |
| env: | |
| OPENATTRIBUTEGRAPH_WERROR: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE_BINARY: 0 | |
| OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS: 1 | |
| container: swift:${{ matrix.swift_version }}-jammy | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set up Linux build environment | |
| run: Scripts/CI/linux_compute_build.sh | |
| shell: bash | |
| - 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: ["26.3"] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| OPENATTRIBUTEGRAPH_WERROR: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE: 1 | |
| OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE_BINARY: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup Xcode | |
| uses: OpenSwiftUIProject/setup-xcode@v2 | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Build in debug mode | |
| run: swift build -c debug | |
| compute_ios_build: | |
| name: Build with Compute (binary) on iOS | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-15] | |
| xcode-version: ["26.3"] | |
| 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 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup Xcode | |
| uses: OpenSwiftUIProject/setup-xcode@v2 | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Set up mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: false | |
| cache: false | |
| - name: Set up Tuist cache | |
| run: | | |
| mise trust mise.toml | |
| mise install | |
| mise exec -- tuist auth login | |
| mise exec -- tuist setup cache | |
| shell: bash | |
| - name: Build in debug mode on iOS Simulator | |
| run: | | |
| result_bundle="${RUNNER_TEMP:-/tmp}/openattributegraph-compute-ios-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult" | |
| rm -rf "$result_bundle" | |
| trap 'rm -rf "$result_bundle"' EXIT | |
| mise exec -- tuist xcodebuild build \ | |
| -workspace .swiftpm/xcode/package.xcworkspace \ | |
| -scheme OpenAttributeGraph \ | |
| -configuration Debug \ | |
| -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ | |
| -derivedDataPath .build-debug \ | |
| -resultBundlePath "$result_bundle" \ | |
| -skipMacroValidation \ | |
| -skipPackagePluginValidation \ | |
| OTHER_SWIFT_FLAGS="-warnings-as-errors" \ | |
| COMPILATION_CACHE_ENABLE_CACHING=YES \ | |
| COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.local/state/tuist/OpenSwiftUIProject_openattributegraph.sock" \ | |
| COMPILATION_CACHE_ENABLE_PLUGIN=YES \ | |
| COMPILATION_CACHE_ENABLE_DIAGNOSTIC_REMARKS=YES |