Skip to content

Swift Snapshot Build #444

Swift Snapshot Build

Swift Snapshot Build #444

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-26
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v7
- 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
run: swiftly install -y ${{ env.SWIFT_SNAPSHOT }}
- name: Build
# --build-system native avoids a SwiftBuild resource-bundle crash
# ("unable to find bundle named SwiftBuild_SWBUniversalPlatform")
# seen in recent main-snapshot toolchains on the CI image.
run: swiftly run swift build +${{ env.SWIFT_SNAPSHOT }} --build-system native