Swift Snapshot Build #325
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 Snapshot Build | |
| permissions: | |
| contents: read | |
| env: | |
| SWIFT_SNAPSHOT: main-snapshot | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| build-snapshot: | |
| name: Build | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest | |
| - name: Install swiftly | |
| run: brew install swiftly && swiftly init --quiet-shell-followup --skip-install -y | |
| - name: Get Swift snapshot | |
| # `swiftly link` ensures SwiftBuild can locate its resource bundles | |
| # (e.g. SwiftBuild_SWBUniversalPlatform) via the toolchain path. | |
| run: | | |
| swiftly install -y ${{ env.SWIFT_SNAPSHOT }} | |
| swiftly link | |
| - name: Build | |
| run: swiftly run swift build +${{ env.SWIFT_SNAPSHOT }} |