Skip to content

Add a nightly 6.2 toolchain verification for swiftly #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/62_snapshot_check.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/nightly_snapshot_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions scripts/prep-gh-action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ while [ $# -ne 0 ]; do
--install-swiftly)
installSwiftly=true
;;
--swift-main-snapshot)
swiftMainSnapshot=true
--swift-snapshot)
swiftSnapshot="$2"
shift;
;;
*)
;;
Expand Down Expand Up @@ -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=()
Expand Down