Skip to content

Commit 21b3382

Browse files
committed
ci: implement dual-version Swift testing (6.0 + 6.2)
- Add macOS jobs for Swift 6.0 (Xcode 16.0) and 6.2 (Xcode 16.2) - Add Linux jobs for Swift 6.0 and 6.2 containers - Test both debug and release configurations on macOS - Ensures compatibility at both ends of support range (Point-Free approach)
1 parent cb08475 commit 21b3382

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17-
macos:
18-
name: macOS (Swift 6.0+)
17+
macos-swift60:
18+
name: macOS (Swift 6.0)
1919
runs-on: macos-15
2020
strategy:
2121
matrix:
@@ -44,15 +44,55 @@ jobs:
4444
- name: Run tests
4545
run: swift test -c ${{ matrix.config }}
4646

47-
linux:
47+
macos-swift62:
48+
name: macOS (Swift 6.2)
49+
runs-on: macos-15
50+
strategy:
51+
matrix:
52+
xcode: ['16.2']
53+
config: ['debug', 'release']
54+
steps:
55+
- uses: actions/checkout@v5
56+
57+
- name: Select Xcode ${{ matrix.xcode }}
58+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
59+
60+
- name: Print Swift version
61+
run: swift --version
62+
63+
- name: Cache Swift packages
64+
uses: actions/cache@v4
65+
with:
66+
path: .build
67+
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
68+
restore-keys: |
69+
${{ runner.os }}-spm-
70+
71+
- name: Build
72+
run: swift build -c ${{ matrix.config }}
73+
74+
- name: Run tests
75+
run: swift test -c ${{ matrix.config }}
76+
77+
linux-swift60:
4878
name: Ubuntu (Swift 6.0)
4979
runs-on: ubuntu-latest
5080
container: swift:6.0
5181
steps:
5282
- uses: actions/checkout@v5
5383

54-
- name: Resolve dependencies
55-
run: swift package resolve
84+
- name: Build
85+
run: swift build
86+
87+
- name: Run tests
88+
run: swift test
89+
90+
linux-swift62:
91+
name: Ubuntu (Swift 6.2)
92+
runs-on: ubuntu-latest
93+
container: swift:6.2
94+
steps:
95+
- uses: actions/checkout@v5
5696

5797
- name: Build
5898
run: swift build

0 commit comments

Comments
 (0)