Skip to content

Commit fcb9cce

Browse files
cmcgee1024kkebo
andauthored
Add a nightly 6.2 toolchain verification for swiftly (#400)
* Add a nightly 6.2 toolchain verification for swiftly --------- Co-authored-by: Kenta Kubo <[email protected]>
1 parent 02739f9 commit fcb9cce

File tree

3 files changed

+44
-7
lines changed

3 files changed

+44
-7
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Smoke Test - 6.2 Nightly Swift Toolchain
2+
3+
on:
4+
schedule:
5+
- cron: '30 2 * * *'
6+
7+
jobs:
8+
tests-selfhosted-linux:
9+
name: Test (Smoke Test - 6.2 Nightly Swift Toolchain) / ${{ matrix.container }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "redhat/ubi9", "debian:12"]
15+
container:
16+
image: ${{ matrix.container }}
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Prepare the action
21+
run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot 6.2
22+
- name: Build and Test
23+
# UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908
24+
# UBI 9 - See https://github.com/swiftlang/swift/issues/80909
25+
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'
26+
27+
tests-selfhosted-macos:
28+
name: Test (Smoke Test - Nightly Swift Toolchain) / macOS Sequoia ARM64
29+
runs-on: [self-hosted, macos, sequoia, ARM64]
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
- name: Prepare the action
34+
run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot 6.2
35+
- name: Build and Test
36+
run: swiftly run +6.2-snapshot swift test

.github/workflows/nightly_snapshot_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Checkout repository
1919
uses: actions/checkout@v4
2020
- name: Prepare the action
21-
run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot
21+
run: ./scripts/prep-gh-action.sh --install-swiftly --swift-snapshot main
2222
- name: Build and Test
2323
# UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908
2424
# UBI 9 - See https://github.com/swiftlang/swift/issues/80909

scripts/prep-gh-action.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ while [ $# -ne 0 ]; do
1818
--install-swiftly)
1919
installSwiftly=true
2020
;;
21-
--swift-main-snapshot)
22-
swiftMainSnapshot=true
21+
--swift-snapshot)
22+
swiftSnapshot="$2"
23+
shift;
2324
;;
2425
*)
2526
;;
@@ -53,10 +54,10 @@ if [ "$installSwiftly" == true ]; then
5354
selector=()
5455
runSelector=()
5556

56-
if [ "$swiftMainSnapshot" == true ]; then
57-
echo "Installing latest main-snapshot toolchain"
58-
selector=("main-snapshot")
59-
runSelector=("+main-snapshot")
57+
if [ "$swiftSnapshot" != "" ]; then
58+
echo "Installing latest $swiftSnapshot-snapshot toolchain"
59+
selector=("$swiftSnapshot-snapshot")
60+
runSelector=("+$swiftSnapshot-snapshot")
6061
elif [ -f .swift-version ]; then
6162
echo "Installing selected swift toolchain from .swift-version file"
6263
selector=()

0 commit comments

Comments
 (0)