Close #6/#7/#8/#9: PathMapping sandbox, loud divergences, bridged subscripts, bridge-coverage overhaul #61
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: Swift | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| # Cancel earlier runs of this workflow on the same branch as soon as | |
| # a new commit comes in — Windows in particular is slow (~10 min for | |
| # swift-syntax + bridges from scratch on a cold runner) and stacking | |
| # runs wastes a CI capacity. | |
| concurrency: | |
| group: swift-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-macos: | |
| # `macos-26` runner is required: the package targets `.macOS("26.0")` | |
| # and the auto-generated Foundation bridges call macOS-26-only APIs | |
| # unconditionally, so the test bundle dyld-refuses on older runners. | |
| runs-on: macos-26 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Select Xcode 26.0 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26.0" | |
| - name: Verify Swift version | |
| run: swift --version | |
| - name: Build (macOS) | |
| run: swift build --build-tests -v | |
| - name: Test (macOS) | |
| run: swift test -v --skip-build | |
| build-ios: | |
| runs-on: macos-26 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Select Xcode 26.0 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26.0" | |
| # `macos-26` ships with Xcode 26 but the iOS 26 simulator runtime | |
| # isn't preinstalled — `xcodebuild` lists the iOS destination as | |
| # "Ineligible: iOS 26.0 is not installed". Pull it down before | |
| # the build step. Adds ~5 min on first run. | |
| - name: Install iOS Simulator runtime | |
| run: sudo xcodebuild -downloadPlatform iOS | |
| # Use the auto-generated `<Package>-Package` umbrella scheme — | |
| # the library scheme `SwiftScriptInterpreter` doesn't define a | |
| # test action. Split build/test into two steps so the Actions UI | |
| # shows where time is spent (matches the macOS / Linux pattern). | |
| - name: Build (iOS Simulator) | |
| run: | | |
| xcodebuild build-for-testing \ | |
| -scheme SwiftScript-Package \ | |
| -destination 'platform=iOS Simulator,OS=latest,name=iPhone 17' \ | |
| -skipPackagePluginValidation | |
| - name: Test (iOS Simulator) | |
| run: | | |
| xcodebuild test-without-building \ | |
| -scheme SwiftScript-Package \ | |
| -destination 'platform=iOS Simulator,OS=latest,name=iPhone 17' \ | |
| -skipPackagePluginValidation | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| container: | |
| # Bumped from 6.0 → 6.3 to stay aligned with the swift-foundation | |
| # revision the scl extract is generated from. Older toolchains' | |
| # bundled Foundation lags behind scl's HEAD and trips bridge | |
| # entries that scl reports as cross-platform. | |
| image: swift:6.3-jammy | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Verify Swift version | |
| run: swift --version | |
| - name: Build (Linux) | |
| run: swift build --build-tests -v | |
| - name: Test (Linux) | |
| run: swift test -v --skip-build | |
| build-windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # SwiftyLab/setup-swift is the unified macOS/Linux/Windows | |
| # toolchain installer. Pin to a specific patch so the version | |
| # is deterministic across runs. | |
| - name: Setup Swift | |
| uses: SwiftyLab/setup-swift@latest | |
| with: | |
| swift-version: "6.3.1" | |
| - name: Verify Swift version | |
| run: swift --version | |
| - name: Build (Windows) | |
| run: swift build --build-tests -v | |
| - name: Test (Windows) | |
| run: swift test -v --skip-build | |
| # Uses skiptools/swift-android-action which wraps the swift.org Android | |
| # SDK setup AND runs the SwiftPM tests on an x86_64 Android emulator. | |
| # No `container:` here — the action provisions its own toolchain and | |
| # the emulator setup needs nested KVM, which only works on the bare | |
| # ubuntu-* runner image. | |
| # | |
| # Single invocation by design: the action's avd-cache and emulator | |
| # launch are gated on `build-package == true && build-tests == true`, | |
| # so a separate "test-only" step (build-package:false) silently skips | |
| # the emulator entirely. Build and test timing is still visible | |
| # inside the action's expanded step list. | |
| build-android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build & test (Android emulator) | |
| uses: skiptools/swift-android-action@v2 | |
| with: | |
| swift-version: "6.3" | |
| # The default GitHub Linux runner has ~14 GiB free; the SDK, | |
| # NDK, and emulator together push past that without cleanup. | |
| free-disk-space: true |