diff --git a/.github/workflows/62_snapshot_check.yml b/.github/workflows/62_snapshot_check.yml new file mode 100644 index 00000000..d4130b57 --- /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 +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 + 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 +6.2-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=()