Skip to content

Commit b00e098

Browse files
committed
ci: implement dual-version Swift testing (5.9 + 6.2)
- Add macOS jobs for Swift 5.9 (Xcode 15.2) and 6.2 (Xcode 16.2) - Add Linux jobs for Swift 5.10 and 6.2 containers - Update Windows CI to Swift 6.2 (already using SwiftyLab/setup-swift) - Test both debug and release configurations on macOS - Ensures compatibility at both ends of support range (Point-Free approach)
1 parent b6e46a8 commit b00e098

File tree

1 file changed

+52
-9
lines changed

1 file changed

+52
-9
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,43 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17-
macos:
18-
name: macOS (Swift 6.1+)
17+
macos-swift59:
18+
name: macOS (Swift 5.9)
19+
runs-on: macos-14
20+
strategy:
21+
matrix:
22+
xcode: ['15.2']
23+
config: ['debug', 'release']
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
- name: Select Xcode ${{ matrix.xcode }}
28+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
29+
30+
- name: Print Swift version
31+
run: swift --version
32+
33+
- name: Cache Swift packages
34+
uses: actions/cache@v4
35+
with:
36+
path: .build
37+
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
38+
restore-keys: |
39+
${{ runner.os }}-spm-
40+
41+
- name: Build
42+
run: swift build -c ${{ matrix.config }}
43+
44+
- name: Run tests
45+
run: swift test -c ${{ matrix.config }}
46+
47+
macos-swift62:
48+
name: macOS (Swift 6.2)
1949
runs-on: macos-15
2050
strategy:
2151
matrix:
22-
xcode: ['16.0']
23-
config: ['release']
52+
xcode: ['16.2']
53+
config: ['debug', 'release']
2454
steps:
2555
- uses: actions/checkout@v5
2656

@@ -44,10 +74,23 @@ jobs:
4474
- name: Run tests
4575
run: swift test -c ${{ matrix.config }}
4676

47-
linux:
48-
name: Ubuntu (Swift 6.0)
77+
linux-swift510:
78+
name: Ubuntu (Swift 5.10)
79+
runs-on: ubuntu-latest
80+
container: swift:5.10
81+
steps:
82+
- uses: actions/checkout@v5
83+
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)
4992
runs-on: ubuntu-latest
50-
container: swift:6.0
93+
container: swift:6.2
5194
steps:
5295
- uses: actions/checkout@v5
5396

@@ -58,14 +101,14 @@ jobs:
58101
run: swift test
59102

60103
windows:
61-
name: Windows (Swift 6.1)
104+
name: Windows (Swift 6.2)
62105
runs-on: windows-latest
63106
steps:
64107
- uses: actions/checkout@v5
65108

66109
- uses: SwiftyLab/setup-swift@latest
67110
with:
68-
swift-version: "6.1"
111+
swift-version: "6.2"
69112

70113
- name: Build
71114
run: swift build

0 commit comments

Comments
 (0)