From 87ae6e1803783961d5f2417eef5cf6cf3e85f443 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 17 Jul 2025 16:33:00 -0400 Subject: [PATCH 1/3] Add a nightly 6.2 toolchain verification for swiftly --- .github/workflows/62_snapshot_check.yml | 36 ++++++++++++++++++++ .github/workflows/nightly_snapshot_check.yml | 2 +- scripts/prep-gh-action.sh | 13 +++---- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/62_snapshot_check.yml diff --git a/.github/workflows/62_snapshot_check.yml b/.github/workflows/62_snapshot_check.yml new file mode 100644 index 00000000..113e088c --- /dev/null +++ b/.github/workflows/62_snapshot_check.yml @@ -0,0 +1,36 @@ +name: Smoke Test - 6.2 Nightly Swift Toolchain + +on: + schedule: + - cron: '30 2 * * *' + +jobs: + tests-selfhosted-linux: + name: Test (Smoke Test - 6.2 Nightly Swift Toolchain) / ${{ matrix.container }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "redhat/ubi9", "debian:12"] + container: + image: ${{ matrix.container }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot 6.2 + - name: Build and Test + # UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908 + # UBI 9 - See https://github.com/swiftlang/swift/issues/80909 + run: bash -c 'if [[ "${{ matrix.container }}" == "redhat/ubi9" ]]; then swiftly run +main-snapshot swift build --build-tests; elif [[ "${{ matrix.container }}" == "ubuntu:20.04" ]]; then swiftly run +main-snapshot swift build --build-tests; else swiftly run +main-snapshot swift test; fi' + + tests-selfhosted-macos: + name: Test (Smoke Test - Nightly Swift Toolchain) / macOS Sequoia ARM64 + runs-on: [self-hosted, macos, sequoia, ARM64] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot 6.2 + - name: Build and Test + run: swiftly run +main-snapshot swift test diff --git a/.github/workflows/nightly_snapshot_check.yml b/.github/workflows/nightly_snapshot_check.yml index 4d706545..cbae8919 100644 --- a/.github/workflows/nightly_snapshot_check.yml +++ b/.github/workflows/nightly_snapshot_check.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Prepare the action - run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot + run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot main - name: Build and Test # UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908 # UBI 9 - See https://github.com/swiftlang/swift/issues/80909 diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index 594edede..15ea0413 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -18,8 +18,9 @@ while [ $# -ne 0 ]; do --install-swiftly) installSwiftly=true ;; - --swift-main-snapshot) - swiftMainSnapshot=true + --swift-snapshot) + swiftSnapshot="$2" + shift; ;; *) ;; @@ -53,10 +54,10 @@ if [ "$installSwiftly" == true ]; then selector=() runSelector=() - if [ "$swiftMainSnapshot" == true ]; then - echo "Installing latest main-snapshot toolchain" - selector=("main-snapshot") - runSelector=("+main-snapshot") + if [ "$swiftSnapshot" != "" ]; then + echo "Installing latest $swiftSnapshot-snapshot toolchain" + selector=("$swiftSnapshot-snapshot") + runSelector=("+$swiftSnapshot-snapshot") elif [ -f .swift-version ]; then echo "Installing selected swift toolchain from .swift-version file" selector=() From 295f8260620689910873a6f2f8aefa54a0508e3d Mon Sep 17 00:00:00 2001 From: Chris McGee <87777443+cmcgee1024@users.noreply.github.com> Date: Fri, 18 Jul 2025 07:12:11 -0400 Subject: [PATCH 2/3] Update .github/workflows/62_snapshot_check.yml Co-authored-by: Kenta Kubo <601636+kkebo@users.noreply.github.com> --- .github/workflows/62_snapshot_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/62_snapshot_check.yml b/.github/workflows/62_snapshot_check.yml index 113e088c..15286b4f 100644 --- a/.github/workflows/62_snapshot_check.yml +++ b/.github/workflows/62_snapshot_check.yml @@ -22,7 +22,7 @@ jobs: - name: Build and Test # UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908 # UBI 9 - See https://github.com/swiftlang/swift/issues/80909 - run: bash -c 'if [[ "${{ matrix.container }}" == "redhat/ubi9" ]]; then swiftly run +main-snapshot swift build --build-tests; elif [[ "${{ matrix.container }}" == "ubuntu:20.04" ]]; then swiftly run +main-snapshot swift build --build-tests; else swiftly run +main-snapshot swift test; fi' + run: bash -c 'if [[ "${{ matrix.container }}" == "redhat/ubi9" ]]; then swiftly run +6.2-snapshot swift build --build-tests; elif [[ "${{ matrix.container }}" == "ubuntu:20.04" ]]; then swiftly run +6.2-snapshot swift build --build-tests; else swiftly run +6.2-snapshot swift test; fi' tests-selfhosted-macos: name: Test (Smoke Test - Nightly Swift Toolchain) / macOS Sequoia ARM64 From 8224e7f051387b9d2e54e02064d65037726cc887 Mon Sep 17 00:00:00 2001 From: Chris McGee <87777443+cmcgee1024@users.noreply.github.com> Date: Fri, 18 Jul 2025 07:12:19 -0400 Subject: [PATCH 3/3] Update .github/workflows/62_snapshot_check.yml Co-authored-by: Kenta Kubo <601636+kkebo@users.noreply.github.com> --- .github/workflows/62_snapshot_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/62_snapshot_check.yml b/.github/workflows/62_snapshot_check.yml index 15286b4f..d4130b57 100644 --- a/.github/workflows/62_snapshot_check.yml +++ b/.github/workflows/62_snapshot_check.yml @@ -33,4 +33,4 @@ jobs: - name: Prepare the action run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot 6.2 - name: Build and Test - run: swiftly run +main-snapshot swift test + run: swiftly run +6.2-snapshot swift test