-
-
Notifications
You must be signed in to change notification settings - Fork 6
162 lines (160 loc) · 5.19 KB
/
ci.yml
File metadata and controls
162 lines (160 loc) · 5.19 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: CI
on:
push:
branches:
- main
schedule:
# Runs at 00:00 UTC every Monday to ensure that CI does not bitrot.
- cron: '0 0 * * 1'
pull_request:
jobs:
pod-lint:
name: Pod Lint
runs-on: macOS-15
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.3'
bundler-cache: true
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
- name: Download visionOS
run: |
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
sudo xcodebuild -downloadPlatform visionOS
sudo xcodebuild -runFirstLaunch
- name: Lint Podspec
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=6.0 --allow-warnings # Cocoapods v1.6 now warns about potential naming colisions.
spm-16:
name: Build Xcode 16
runs-on: macOS-15
strategy:
matrix:
platforms: [
'iOS_18',
'tvOS_18',
'macOS_15',
'macCatalyst_15',
'watchOS_11',
'visionOS_2'
]
fail-fast: false
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.3'
bundler-cache: true
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
- name: Download Platform
if: matrix.platforms != 'macOS_15' && matrix.platforms != 'macCatalyst_15'
run: |
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
PLATFORM="${{ matrix.platforms }}"
sudo xcodebuild -downloadPlatform "${PLATFORM%%_*}"
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }}
- name: Prepare Coverage Reports
if: matrix.platforms != 'watchOS_11'
run: ./Scripts/prepare-coverage-reports.sh
- name: Upload Coverage Reports
if: success() && matrix.platforms != 'watchOS_11'
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
verbose: true
spm-16-swift:
name: Swift Build Xcode 16
runs-on: macOS-15
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.3'
bundler-cache: true
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_16.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release -Xswiftc -enable-testing
linux-6-0:
name: Build and Test on Linux 6.0
runs-on: ubuntu-latest
container: swift:6.0.3
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Build and Test Framework
run: swift test -c release --enable-code-coverage -Xswiftc -enable-testing
- name: Prepare Coverage Reports
run: |
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/release/CacheAdvancePackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/release/codecov/default.profdata > coverage.lcov
- name: Install curl for Codecov
run: |
apt-get update
apt-get install -y --no-install-recommends curl ca-certificates
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
verbose: true
linux-6-1:
name: Build and Test on Linux 6.1
runs-on: ubuntu-latest
container: swift:6.1
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Build and Test Framework
run: swift test -c release --enable-code-coverage -Xswiftc -enable-testing
- name: Prepare Coverage Reports
run: |
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/release/CacheAdvancePackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/release/codecov/default.profdata > coverage.lcov
- name: Install curl for Codecov
run: |
apt-get update
apt-get install -y --no-install-recommends curl ca-certificates
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
verbose: true
readme-validation:
name: Check Markdown links
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Link Checker
uses: AlexanderDokuchaev/md-dead-link-check@d5a37e0b14e5918605d22b34562532762ccb2e47 # v1.2.0
lint-swift:
name: Lint Swift
runs-on: ubuntu-latest
container: swift:6.0
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Lint Swift
run: swift run --package-path CLI swiftformat . --lint