forked from huggingface/AnyLanguageModel
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (92 loc) · 3.51 KB
/
ci.yml
File metadata and controls
104 lines (92 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
pull-requests: write
jobs:
test-macos:
name: Swift ${{ matrix.swift }} on macOS ${{ matrix.macos }} with Xcode ${{ matrix.xcode }}${{ matrix.traits != '' && format(' and --traits {0}', matrix.traits) || '' }}
runs-on: macos-${{ matrix.macos }}
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
strategy:
fail-fast: false
matrix:
include:
- macos: "15"
swift: "6.1"
xcode: "16.3"
traits: ""
- macos: "15"
swift: "6.1"
xcode: "16.3"
traits: "AsyncHTTPClient"
- macos: "26"
swift: "6.2"
xcode: "26.0"
traits: ""
- macos: "26"
swift: "6.2"
xcode: "26.0"
traits: "AsyncHTTPClient"
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Swift Package Manager dependencies
uses: actions/cache@v5
with:
path: |
~/.cache/org.swift.swiftpm
.build
key: ${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}-spm-${{ hashFiles('Package.swift', 'Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}-spm-
- name: Lint
run: swift format lint --strict --recursive .
- name: Build
run: swift build --build-tests --traits MLX,Llama,CoreML${{ matrix.traits != '' && format(',{0}', matrix.traits) || '' }}
- name: Test
run: swift test --skip-build --traits MLX,Llama,CoreML${{ matrix.traits != '' && format(',{0}', matrix.traits) || '' }}
test-linux:
name: Swift ${{ matrix.swift }} on Linux${{ matrix.traits != '' && format(' and --traits {0}', matrix.traits) || '' }}
runs-on: ubuntu-latest
container: swift:${{ matrix.swift }}
strategy:
fail-fast: false
matrix:
include:
- swift: "6.1.3"
traits: ""
# Temporary workaround: Skip AsyncHTTPClient on Linux Swift 6.1
# due to toolchain linker failure in libswiftObservation.so (undefined swift::threading::fatal).
# Keep AsyncHTTPClient coverage on Linux Swift 6.2 and re-enable here once fixed upstream.
# - swift: "6.1.3"
# traits: "AsyncHTTPClient"
- swift: "6.2.4"
traits: ""
- swift: "6.2.4"
traits: "AsyncHTTPClient"
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Swift Package Manager dependencies
uses: actions/cache@v5
with:
path: |
~/.cache/org.swift.swiftpm
.build
key: ${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}-spm-${{ hashFiles('Package.swift', 'Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-${{ matrix.swift }}-${{ matrix.traits == '' && 'ahc-off' || 'ahc-on' }}-spm-
- name: Lint
run: swift format lint --strict --recursive .
- name: Build
run: swift build${{ matrix.traits != '' && format(' --traits {0}', matrix.traits) || '' }}
- name: Test
run: swift test${{ matrix.traits != '' && format(' --traits {0}', matrix.traits) || '' }}