forked from huggingface/AnyLanguageModel
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 1.82 KB
/
ci.yml
File metadata and controls
78 lines (66 loc) · 1.82 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
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 }}
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"
- macos: "26"
swift: "6.2"
xcode: "26.0"
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Swift Package Manager dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/org.swift.swiftpm
.build
key: ${{ runner.os }}-swift-${{ matrix.swift }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-${{ matrix.swift }}-spm-
- name: Lint
run: swift format lint --strict --recursive .
- name: Build
run: swift build --build-tests --traits MLX,Llama,CoreML
- name: Test
run: swift test --skip-build
test-linux:
name: Swift ${{ matrix.swift-version }} on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
swift-version:
- 6.1.0
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Swift
uses: vapor/swiftly-action@v0.2
with:
toolchain: ${{ matrix.swift-version }}
- name: Lint
run: swift format lint --strict --recursive .
- name: Build
run: swift build
- name: Test
run: swift test