Module Improvements #90
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # Cancel superseded runs for the same ref. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| linux: | |
| name: Linux (Swift 6.3) | |
| runs-on: ubuntu-latest | |
| container: swift:6.3 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Swift version | |
| run: swift --version | |
| - name: Cache SwiftPM | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| .build | |
| Examples/ExampleSite/.build | |
| key: spm-linux-${{ hashFiles('Package.swift', 'Examples/ExampleSite/Package.swift') }} | |
| restore-keys: spm-linux- | |
| - name: Run tests | |
| run: swift test | |
| - name: Build & generate the example site | |
| working-directory: Examples/ExampleSite | |
| run: swift run ExampleSite | |
| macos: | |
| name: macOS | |
| runs-on: macos-26 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # The package's Swift settings (LifetimeDependence, NonisolatedNonsendingByDefault, | |
| # InternalImportsByDefault, …) require Swift 6.2+, so select the newest Xcode. | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest | |
| - name: Swift version | |
| run: swift --version | |
| - name: Cache SwiftPM | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| .build | |
| Examples/ExampleSite/.build | |
| key: spm-macos-${{ hashFiles('Package.swift', 'Examples/ExampleSite/Package.swift') }} | |
| restore-keys: spm-macos- | |
| # `--no-parallel` runs swift-testing in-process instead of spawning the | |
| # `swiftpm-testing-helper` worker, whose IPC with the parent deadlocks at | |
| # launch on the headless macOS runner (the test bundle builds, then hangs | |
| # with no output). In-process execution avoids that helper entirely. | |
| - name: Run tests | |
| run: swift test --no-parallel | |
| - name: Build & generate the example site | |
| working-directory: Examples/ExampleSite | |
| run: swift run ExampleSite | |
| api-breakage: | |
| name: API breakage | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| container: swift:6.3 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # Full history so the public API can be diffed against the PR's base. | |
| fetch-depth: 0 | |
| # https://github.com/actions/checkout/issues/766 | |
| - name: API breaking changes | |
| run: | | |
| git config --global --add safe.directory "${GITHUB_WORKSPACE}" | |
| swift package diagnose-api-breaking-changes origin/main |