@@ -12,7 +12,7 @@ permissions:
1212
1313jobs :
1414 test-macos :
15- name : Swift ${{ matrix.swift }} on macOS ${{ matrix.macos }} with Xcode ${{ matrix.xcode }}
15+ name : Swift ${{ matrix.swift }} on macOS ${{ matrix.macos }} with Xcode ${{ matrix.xcode }}${{ matrix.traits != '' && format(' and --traits {0}', matrix.traits) || '' }}
1616 runs-on : macos-${{ matrix.macos }}
1717 env :
1818 DEVELOPER_DIR : " /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
2323 - macos : " 15"
2424 swift : " 6.1"
2525 xcode : " 16.3"
26+ traits : " "
27+ - macos : " 15"
28+ swift : " 6.1"
29+ xcode : " 16.3"
30+ traits : " AsyncHTTPClient"
2631 - macos : " 26"
2732 swift : " 6.2"
2833 xcode : " 26.0"
34+ traits : " "
35+ - macos : " 26"
36+ swift : " 6.2"
37+ xcode : " 26.0"
38+ traits : " AsyncHTTPClient"
2939 timeout-minutes : 10
3040 steps :
3141 - name : Checkout code
@@ -37,29 +47,35 @@ jobs:
3747 path : |
3848 ~/.cache/org.swift.swiftpm
3949 .build
40- key : ${{ runner.os }}-swift-${{ matrix.swift }}-spm-${{ hashFiles('**/ Package.resolved') }}
50+ key : ${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}- spm-${{ hashFiles('Package.swift', ' Package.resolved') }}
4151 restore-keys : |
42- ${{ runner.os }}-swift-${{ matrix.swift }}-spm-
52+ ${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}- spm-
4353
4454 - name : Lint
4555 run : swift format lint --strict --recursive .
4656
4757 - name : Build
48- run : swift build --build-tests --traits MLX,Llama,CoreML
58+ run : swift build --build-tests --traits MLX,Llama,CoreML${{ matrix.traits != '' && format(',{0}', matrix.traits) || '' }}
4959
5060 - name : Test
51- run : swift test --skip-build
61+ run : swift test --skip-build --traits MLX,Llama,CoreML${{ matrix.traits != '' && format(',{0}', matrix.traits) || '' }}
5262
5363 test-linux :
54- name : Swift ${{ matrix.swift }} on Linux
64+ name : Swift ${{ matrix.swift }} on Linux${{ matrix.traits != '' && format(' and --traits {0}', matrix.traits) || '' }}
5565 runs-on : ubuntu-latest
5666 container : swift:${{ matrix.swift }}
5767 strategy :
5868 fail-fast : false
5969 matrix :
60- swift :
61- - " 6.1.3"
62- - " 6.2.4"
70+ include :
71+ - swift : " 6.1.3"
72+ traits : " "
73+ - swift : " 6.1.3"
74+ traits : " AsyncHTTPClient"
75+ - swift : " 6.2.4"
76+ traits : " "
77+ - swift : " 6.2.4"
78+ traits : " AsyncHTTPClient"
6379 timeout-minutes : 10
6480 steps :
6581 - name : Checkout code
@@ -71,15 +87,15 @@ jobs:
7187 path : |
7288 ~/.cache/org.swift.swiftpm
7389 .build
74- key : ${{ runner.os }}-swift-${{ matrix.swift }}-spm-${{ hashFiles('Package.resolved') }}
90+ key : ${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}- spm-${{ hashFiles('Package.swift', 'Package.resolved') }}
7591 restore-keys : |
76- ${{ runner.os }}-swift-${{ matrix.swift }}-spm-
92+ ${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}- spm-
7793
7894 - name : Lint
7995 run : swift format lint --strict --recursive .
8096
8197 - name : Build
82- run : swift build
98+ run : swift build${{ matrix.traits != '' && format(' --traits {0}', matrix.traits) || '' }}
8399
84100 - name : Test
85- run : swift test
101+ run : swift test${{ matrix.traits != '' && format(' --traits {0}', matrix.traits) || '' }}
0 commit comments