-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (96 loc) · 2.59 KB
/
Copy pathci.yml
File metadata and controls
103 lines (96 loc) · 2.59 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
name: CI
on:
push:
workflow_dispatch:
jobs:
macos:
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- name: Swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
run: swift test -v
coverage:
name: Code Coverage
runs-on: macos-26
permissions:
contents: read
code-quality: write # required by actions/upload-code-coverage
steps:
- uses: actions/checkout@v4
- name: Export coverage and enforce threshold
run: Scripts/coverage.sh
env:
COVERAGE_THRESHOLD: 95
- name: Upload coverage to GitHub Code Quality
uses: actions/upload-code-coverage@v1
with:
file: .build/coverage/coverage.xml
language: Swift
label: code-coverage/llvm-cov
# Code Quality was in public preview until 2026-07-20; keep this while
# the repo might not have the feature enabled, so a failed upload
# doesn't break CI.
fail-on-error: false
- name: Upload coverage artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: .build/coverage/
if-no-files-found: error
linux:
runs-on: ubuntu-latest
container: swift:6.3.3
steps:
- uses: actions/checkout@v4
- name: Swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
run: swift test -v
linux-system-sqlite:
name: Linux (system SQLite)
runs-on: ubuntu-latest
container: swift:6.3.3
env:
SWIFT_BUILD_SYSTEM_SQLITE: '1'
steps:
- uses: actions/checkout@v4
- name: Install SQLite
run: |
apt-get update
apt-get install -y --no-install-recommends libsqlite3-dev pkg-config
- name: Swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
run: swift test -v
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test Swift Package on Android
uses: skiptools/swift-android-action@v2
with:
swift-version: '6.3'
free-disk-space: true
windows:
runs-on: windows-latest
steps:
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-6.3.2-release
tag: 6.3.2-RELEASE
- uses: actions/checkout@v4
- name: Swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
run: swift test -v