-
Notifications
You must be signed in to change notification settings - Fork 2
197 lines (189 loc) · 6.52 KB
/
ci.yml
File metadata and controls
197 lines (189 loc) · 6.52 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: "validator"
on:
push:
branches:
- main
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package.swift"
- "Source/**"
- "Tests/**"
pull_request:
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package.swift"
- "Source/**"
- "Tests/**"
concurrency:
group: validator-${{ github.head_ref }}
cancel-in-progress: true
jobs:
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_26.0.1"
runsOn: macOS-26
name: "macOS 26, Xcode 26.0, Swift 6.2.0"
- xcode: "Xcode_16.1"
runsOn: macOS-14
name: "macOS 14, Xcode 16.1, Swift 6.0.2"
- xcode: "Xcode_15.4"
runsOn: macOS-14
name: "macOS 14, Xcode 15.4, Swift 5.10"
steps:
- uses: actions/checkout@v6
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Validator-Package" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: Validator-Package
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
iOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=26.0.1,name=iPhone 17 Pro"
xcode: "Xcode_26.0.1"
runsOn: macOS-26
name: "OS=26.0, Xcode 26.0, Swift 6.2.0"
- destination: "OS=18.1,name=iPhone 16 Pro"
name: "iOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=17.4,name=iPhone 15 Pro"
name: "iOS 17.4"
xcode: "Xcode_15.3"
runsOn: macos-14
steps:
- uses: actions/checkout@v6
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Validator-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v5
with:
name: ${{ matrix.name }}
path: test_output
tvOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=26.0,name=Apple TV"
xcode: "Xcode_26.0.1"
runsOn: macOS-26
name: "tvOS 26.0"
- destination: "OS=18.1,name=Apple TV"
name: "tvOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=17.4,name=Apple TV"
name: "tvOS 17.4"
xcode: "Xcode_15.3"
runsOn: macos-14
steps:
- uses: actions/checkout@v6
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Validator-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: Validator-Package
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
watchOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=26.0,name=Apple Watch Ultra 3 (49mm)"
xcode: "Xcode_26.0.1"
runsOn: macOS-26
name: "watchOS 26.0"
- destination: "OS=11.1,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=10.5,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.5"
xcode: "Xcode_15.3"
runsOn: macOS-14
- destination: "OS=10.4,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.4"
xcode: "Xcode_15.3"
runsOn: macos-14
steps:
- uses: actions/checkout@v6
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Validator-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: Validator-Package
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
spm:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "macOS 26, SPM 6.2.0 Test"
xcode: "Xcode_26.0.1"
runsOn: macOS-26
- destination: "macOS 15, SPM 6.0.2 Test"
xcode: "Xcode_16.0"
runsOn: macOS-15
- name: "macOS 14, SPM 6.0.2 Test"
xcode: "Xcode_16.1"
runsOn: macOS-14
- name: "macOS 14, SPM 5.10.0 Test"
xcode: "Xcode_15.3"
runsOn: macos-14
steps:
- uses: actions/checkout@v6
- name: ${{ matrix.name }}
run: swift build -c release
merge-test-reports:
needs: [iOS, macOS, watchOS, tvOS]
runs-on: macos-15
steps:
- name: Download artifacts
uses: actions/download-artifact@v6
with:
path: test_output
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
- name: Upload Merged Artifact
uses: actions/upload-artifact@v5
with:
name: MergedResult
path: test_output/final