Subrepos: test against swift-build feature branch + fold build-wasm i… #87
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: Spinetail | |
| # Standalone CI for Spinetail, following the BrightDigit CI template on Swift | |
| # 6.4. Spinetail is swift-tools-version:6.4, so every leg runs on the nightly | |
| # 6.4 toolchain — the only one that can resolve the manifest. macOS runs on the | |
| # self-hosted runner with /Applications/Xcode-beta.app; Windows on a swift.org | |
| # nightly snapshot. WASM + Android deferred (see the note below the build jobs). | |
| on: | |
| push: | |
| branches: [main, brightdigit-com-260406] | |
| tags: ['v*.*.*'] | |
| paths-ignore: | |
| - '**.md' | |
| - 'LICENSE' | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - 'LICENSE' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-ubuntu: | |
| name: Build on Ubuntu | |
| runs-on: ubuntu-latest | |
| container: swiftlang/swift:nightly-6.4.x-noble | |
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: brightdigit/swift-build@sdk-url-checksum-nightly-6.4 | |
| id: build | |
| - name: Install curl (required by Codecov uploader) | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| run: | | |
| if ! command -v curl &> /dev/null; then | |
| apt-get update -q | |
| apt-get install -y --no-install-recommends curl ca-certificates | |
| fi | |
| # brightdigit fork of swift-coverage-action: upstream @v5 can't pair the | |
| # profdata with the test binary under Swift 6.4's swiftbuild layout | |
| # (.so + <Name>-test-runner, no .xctest) — issue #92. Pinned by SHA. | |
| - uses: brightdigit/swift-coverage-action@2f8538f723b99ab2406ac3a0e5b3355a9de4cf6c | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| id: coverage-files | |
| with: | |
| search-paths: .build | |
| fail-on-empty-output: true | |
| - name: Upload coverage to Codecov | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| fail_ci_if_error: false | |
| flags: noble,swift-6.4 | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }} | |
| # WASM build folded into the Ubuntu job: same nightly-6.4.x-noble container, | |
| # one spin-up, runs on every push/PR. continue-on-error so a wasm regression | |
| # doesn't block the Linux build while the swift-build wasm-sdk-url path is | |
| # validated. Bump the snapshot SDK URL/checksum periodically. | |
| - name: Build on WASM | |
| id: wasm | |
| continue-on-error: true | |
| uses: brightdigit/swift-build@sdk-url-checksum-nightly-6.4 | |
| with: | |
| type: wasm | |
| wasm-sdk-url: https://download.swift.org/swift-6.4.x-branch/wasm-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a_wasm.artifactbundle.tar.gz | |
| wasm-sdk-checksum: c014a0162de6eeeef4f07904ce096ccee5405c1478a12c99a3a9750bd42d7702 | |
| wasm-swift-flags: >- | |
| -Xcc -D_WASI_EMULATED_SIGNAL -Xcc -D_WASI_EMULATED_MMAN | |
| -Xlinker -lwasi-emulated-signal -Xlinker -lwasi-emulated-mman | |
| -Xlinker -lwasi-emulated-getpid | |
| -Xlinker --initial-memory=536870912 -Xlinker --max-memory=536870912 | |
| configure: | |
| name: Configure Matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| full-matrix: ${{ steps.check.outputs.full }} | |
| run-windows: ${{ steps.check.outputs.windows }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: check | |
| name: Determine matrix scope | |
| run: | | |
| # Three tiers: small set (build-ubuntu/build-macos/lint, always) < | |
| # full-matrix (macOS-platforms/wasm/android) < +Windows. full-matrix runs on | |
| # main / semver / dispatch / PRs into main or semver. Windows is the most | |
| # expensive leg, so run-windows is the same MINUS PRs into semver branches. | |
| FULL=false; WIN=false | |
| REF="${{ github.ref }}"; EVENT="${{ github.event_name }}"; BASE_REF="${{ github.base_ref }}" | |
| if [[ "$REF" == "refs/heads/main" ]]; then FULL=true; WIN=true | |
| elif [[ "$REF" =~ ^refs/heads/v?[0-9]+\.[0-9]+\.[0-9]+ ]]; then FULL=true; WIN=true | |
| elif [[ "$EVENT" == "workflow_dispatch" ]]; then FULL=true; WIN=true | |
| elif [[ "$EVENT" == "pull_request" ]]; then | |
| if [[ "$BASE_REF" == "main" ]]; then FULL=true; WIN=true | |
| elif [[ "$BASE_REF" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+ ]]; then FULL=true | |
| fi | |
| fi | |
| echo "full=$FULL" >> "$GITHUB_OUTPUT" | |
| echo "windows=$WIN" >> "$GITHUB_OUTPUT" | |
| # Self-hosted macOS runner ships /Applications/Xcode-beta.app (Swift 6.4) — the | |
| # only path to a 6.4 toolchain on macOS today. Always runs. | |
| build-macos: | |
| name: Build on macOS | |
| runs-on: [self-hosted, macOS] | |
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: brightdigit/swift-build@sdk-url-checksum-nightly-6.4 | |
| id: build | |
| with: | |
| xcode: "/Applications/Xcode-beta.app" | |
| - name: Process coverage | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| uses: sersoft-gmbh/swift-coverage-action@v5 | |
| with: | |
| search-paths: .build | |
| - name: Upload coverage to Codecov | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| fail_ci_if_error: false | |
| flags: spm,macos | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # Windows nightly 6.4 via swift.org development snapshot (compnerd/gha-setup-swift | |
| # under swift-build). Hosted runners — the only self-hosted runner is macOS. | |
| # Most expensive leg — own tier (run-windows): main / semver / dispatch / PRs | |
| # into main, but NOT PRs into semver branches (those still get the rest of the | |
| # full matrix, just not Windows). | |
| # continue-on-error: swift-openapi transport support on Windows is unverified; | |
| # drop continue-on-error once a run is green. Bump the snapshot id periodically. | |
| build-windows: | |
| name: Build on Windows | |
| needs: configure | |
| if: ${{ needs.configure.outputs.run-windows == 'true' }} | |
| runs-on: ${{ matrix.runs-on }} | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [windows-2022, windows-2025] | |
| swift: | |
| - version: swift-6.4.x-branch | |
| build: 6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-01-a | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: brightdigit/swift-build@sdk-url-checksum-nightly-6.4 | |
| id: build | |
| with: | |
| windows-swift-version: ${{ matrix.swift.version }} | |
| windows-swift-build: ${{ matrix.swift.build }} | |
| # Full Apple-platform suite (iOS/watchOS/tvOS) on Swift 6.4. Runs on the | |
| # self-hosted runner with /Applications/Xcode-beta.app (Xcode 27 / Swift 6.4) — | |
| # required here: this package is swift-tools-version:6.4, so hosted released-Xcode | |
| # runners can't even parse the manifest. Uses the iOS/watchOS/tvOS 27.0 simulator | |
| # runtimes on the runner. continue-on-error until green (swift-openapi on the | |
| # simulators is unverified). Bump deviceName/osVersion as the Xcode-beta moves. | |
| build-macos-platforms: | |
| name: Build on macOS (Platforms) | |
| needs: configure | |
| if: ${{ needs.configure.outputs.full-matrix == 'true' }} | |
| runs-on: [self-hosted, macOS] | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { type: ios, deviceName: "iPhone 17 Pro", osVersion: "27.0" } | |
| - { type: watchos, deviceName: "Apple Watch Ultra 3 (49mm)", osVersion: "27.0" } | |
| - { type: tvos, deviceName: "Apple TV 4K (3rd generation)", osVersion: "27.0" } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build and Test | |
| id: build | |
| uses: brightdigit/swift-build@sdk-url-checksum-nightly-6.4 | |
| with: | |
| type: ${{ matrix.type }} | |
| xcode: "/Applications/Xcode-beta.app" | |
| deviceName: ${{ matrix.deviceName }} | |
| osVersion: ${{ matrix.osVersion }} | |
| - name: Process coverage | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| uses: sersoft-gmbh/swift-coverage-action@v5 | |
| with: | |
| search-paths: .build | |
| - name: Upload coverage to Codecov | |
| if: steps.build.outputs.contains-code-coverage == 'true' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: ${{ format('{0}{1}', matrix.type, matrix.osVersion) }} | |
| # Android on nightly 6.4 via a swift.org swift-6.4.x-branch snapshot SDK bundle | |
| # (custom-sdk-url path, needs brightdigit/swift-build#116). continue-on-error | |
| # until that ships in @v1 and the leg goes green — swift-openapi Android support | |
| # is unverified. build-only (android-run-tests: false). Bump the snapshot id. | |
| build-android: | |
| name: Build on Android | |
| needs: configure | |
| if: ${{ needs.configure.outputs.full-matrix == 'true' }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| android-api-level: [34] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: | |
| tool-cache: false | |
| android: false | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - uses: brightdigit/swift-build@sdk-url-checksum-nightly-6.4 | |
| with: | |
| type: android | |
| android-swift-version: 6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a | |
| android-sdk-url: https://download.swift.org/swift-6.4.x-branch/android-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a_android.artifactbundle.tar.gz | |
| android-sdk-id: swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a_android | |
| android-api-level: ${{ matrix.android-api-level }} | |
| android-run-tests: false | |
| lint: | |
| name: Linting | |
| if: ${{ !cancelled() && !failure() && !contains(github.event.head_commit.message, 'ci skip') }} | |
| needs: [build-ubuntu, build-macos, build-windows, build-macos-platforms] | |
| runs-on: ubuntu-latest | |
| container: swiftlang/swift:nightly-6.4.x-noble | |
| steps: | |
| - name: Install curl (required by mise-action) | |
| run: | | |
| apt-get update -q | |
| apt-get install -y --no-install-recommends curl ca-certificates | |
| - uses: actions/checkout@v6 | |
| - uses: jdx/mise-action@v4 | |
| env: | |
| MISE_HTTP_TIMEOUT: 300s | |
| MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| cache: true | |
| - name: Lint | |
| run: ./Scripts/lint.sh | |
| env: | |
| LINT_MODE: STRICT |