@@ -14,21 +14,15 @@ concurrency:
1414 cancel-in-progress : true
1515
1616jobs :
17- # Note: Swift Testing framework requires Swift 6.0+
18- # macOS Swift 5.10 has backported Testing framework via Xcode 26.0
19- # Linux Swift 5.10 does NOT have Testing framework - use 6.2 only
20- macos-swift510 :
21- name : macOS (Swift 5.10)
17+ # Primary development workflow: Latest Swift on macOS with debug build
18+ macos-latest :
19+ name : macOS (Swift 6.2, debug)
2220 runs-on : macos-26
23- strategy :
24- matrix :
25- xcode : ['26.0']
26- config : ['debug', 'release']
2721 steps :
2822 - uses : actions/checkout@v5
2923
30- - name : Select Xcode ${{ matrix.xcode }}
31- run : sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }} .app
24+ - name : Select Xcode 26.0
25+ run : sudo xcode-select -s /Applications/Xcode_26.0 .app
3226
3327 - name : Print Swift version
3428 run : swift --version
@@ -37,48 +31,29 @@ jobs:
3731 uses : actions/cache@v4
3832 with :
3933 path : .build
40- key : ${{ runner.os }}-spm-${{ hashFiles('Package.resolved ') }}
34+ key : ${{ runner.os }}-spm-${{ hashFiles('Package.swift ') }}
4135 restore-keys : |
4236 ${{ runner.os }}-spm-
4337
44- - name : Build
45- run : swift build -c ${{ matrix.config }}
46-
47- - name : Run tests
48- run : swift test -c ${{ matrix.config }}
49-
50- macos-swift62 :
51- name : macOS (Swift 6.2)
52- runs-on : macos-26
53- strategy :
54- matrix :
55- xcode : ['26.0']
56- config : ['debug', 'release']
57- steps :
58- - uses : actions/checkout@v5
59-
60- - name : Select Xcode ${{ matrix.xcode }}
61- run : sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
62-
63- - name : Print Swift version
64- run : swift --version
38+ # Note: swift test builds automatically, no separate build step needed
39+ - name : Test
40+ run : swift test -c debug
6541
66- - name : Cache Swift packages
67- uses : actions/cache@v4
68- with :
69- path : .build
70- key : ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
71- restore-keys : |
72- ${{ runner.os }}-spm-
42+ - name : Validate Package.swift
43+ run : swift package dump-package
7344
74- - name : Build
75- run : swift build -c ${{ matrix.config }}
45+ - name : Run README verification tests
46+ run : swift test --filter ReadmeVerificationTests
7647
77- - name : Run tests
78- run : swift test -c ${{ matrix.config }}
48+ - name : Check for API breaking changes
49+ run : |
50+ swift package diagnose-api-breaking-changes \
51+ --breakage-allowlist-path .swift-api-breakage-allowlist || true
52+ continue-on-error : true
7953
80- linux-swift62 :
81- name : Ubuntu (Swift 6.2)
54+ # Production validation: Latest Swift on Linux with release build
55+ linux-latest :
56+ name : Ubuntu (Swift 6.2, release)
8257 runs-on : ubuntu-latest
8358 container : swift:6.2
8459 steps :
@@ -88,47 +63,29 @@ jobs:
8863 uses : actions/cache@v4
8964 with :
9065 path : .build
91- key : ${{ runner.os }}-spm-${{ hashFiles('Package.resolved ') }}
66+ key : ${{ runner.os }}-spm-${{ hashFiles('Package.swift ') }}
9267 restore-keys : ${{ runner.os }}-spm-
9368
94- - name : Build
95- run : swift build
96-
97- - name : Run tests
98- run : swift test
69+ # Note: swift test builds automatically in release mode
70+ - name : Test (release)
71+ run : swift test -c release
9972
100- readme :
101- name : README Code Examples
102- runs-on : macos-26
103- steps :
104- - uses : actions/checkout@v5
105-
106- - name : Select Xcode
107- run : sudo xcode-select -s /Applications/Xcode_26.0.app
108-
109- - name : Run README verification tests
110- run : swift test --filter ReadmeVerificationTests
111-
112- - name : Validate README examples compile
113- run : |
114- echo "✅ All README code examples are verified to compile and work"
115-
116- documentation :
117- name : Documentation
118- runs-on : macos-26
73+ # Compatibility check: Minimum supported Swift version (6.0)
74+ # Note: Swift Testing framework requires Swift 6.0+
75+ linux-compat :
76+ name : Ubuntu (Swift 6.0, compatibility)
77+ runs-on : ubuntu-latest
78+ container : swift:6.0
11979 steps :
12080 - uses : actions/checkout@v5
12181
122- - name : Select Xcode
123- run : sudo xcode-select -s /Applications/Xcode_26.0.app
82+ - name : Cache Swift packages
83+ uses : actions/cache@v4
84+ with :
85+ path : .build
86+ key : ${{ runner.os }}-swift60-spm-${{ hashFiles('Package.swift') }}
87+ restore-keys : ${{ runner.os }}-swift60-spm-
12488
125- - name : Build documentation
126- run : |
127- swift package \
128- --allow-writing-to-directory ./docs \
129- generate-documentation \
130- --target CSSTypes \
131- --output-path ./docs \
132- --transform-for-static-hosting \
133- --hosting-base-path swift-css-types
134- continue-on-error : true
89+ # Note: swift test builds automatically
90+ - name : Test (Swift 6.0)
91+ run : swift test -c release
0 commit comments