You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The workflow is manual-only (`workflow_dispatch`). There are no automatic triggers for pull requests or pushes.
12
14
@@ -19,7 +21,12 @@ There is one workflow, `SDK Validation`, with four user-facing validation flows
19
21
-`run_tests`
20
22
-`lint_pods`
21
23
22
-
Internally, the workflow also has a technical `Prepare CI config` job that validates inputs and computes effective matrices before the validation jobs start.
24
+
Internally, the workflow also has one technical job, `Prepare CI config`, that:
25
+
26
+
- validates workflow input defaults against `.github/ci/ci-run-config.json`
27
+
- parses boolean and JSON overrides
28
+
- validates matrix structure
29
+
- derives the effective matrices used by downstream jobs
23
30
24
31
Default manual profile:
25
32
@@ -28,15 +35,30 @@ Default manual profile:
28
35
-`run_tests = true`
29
36
-`lint_pods = false`
30
37
38
+
Concurrency behavior:
39
+
40
+
- manual runs are grouped by `workflow + ref`
41
+
- starting a new `SDK Validation` run on the same branch cancels the previous in-progress run on that branch
42
+
31
43
## Validation Flows
32
44
33
45
### `build_sdk_targets`
34
46
35
47
What it does:
36
48
37
-
- runs SwiftPM SDK library target builds across `build_matrix`
38
-
- builds the iOS package scheme `Adapty-Package` on the primary `sdk_tests` entry (`runner + xcode`)
39
-
- runs a separate one-Xcode macOS SDK build on `sdk_tests.runner` + `sdk_tests.xcode`
49
+
- runs `build_sdk_matrix` across `build_matrix`
50
+
- for each matrix entry:
51
+
- resolves SwiftPM dependencies inside the configured scratch path
52
+
- discovers library products from `Package.swift`
53
+
- builds each SwiftPM library target
54
+
- on the primary `sdk_tests.runner + sdk_tests.xcode` entry, also builds the iOS package scheme `Adapty-Package`
55
+
- runs a separate `macos_sdk_build` job on `sdk_tests.runner + sdk_tests.xcode`
- uses the single primary `sdk_tests` entry filtered from `build_matrix`
67
-
- strict failure
101
+
- runs only on the single primary entry derived from `build_matrix`
102
+
- the helper writes `exit_code` to `GITHUB_OUTPUT`
103
+
- the workflow uploads the log first, then fails in a separate step if `exit_code != 0`
104
+
- effectively blocking, because the derived primary entry must have `informational: false`
105
+
106
+
Artifact:
107
+
108
+
-`demo-build-log-<runner>-xcode-<xcode>`
68
109
69
110
### `run_tests`
70
111
71
112
What it does:
72
113
73
-
- runs `swift test` using `sdk_tests_matrix`
114
+
- runs `sdk_tests` across `sdk_tests_matrix`
115
+
- for each matrix entry:
116
+
- resolves SwiftPM dependencies
117
+
- runs `swift test`
118
+
- uploads `swift-test.log` even when `swift test` returns non-zero
119
+
120
+
Scripts involved:
121
+
122
+
-`scripts/ci/sdk_validation/run-sdk-tests.sh`
123
+
-`scripts/ci/sdk_validation/lib/logging.sh`
74
124
75
125
Inputs that affect it:
76
126
@@ -79,58 +129,120 @@ Inputs that affect it:
79
129
80
130
Behavior:
81
131
82
-
- strict failure
83
-
- no whitelist support
132
+
- default config is blocking, because the default matrix contains one primary entry with `informational: false`
133
+
- override entries may use `informational: true`; those entries run with `continue-on-error`
134
+
-`sdk_tests_matrix_override_json` does not have to include the primary `sdk_tests` entry
135
+
- there is no whitelist mechanism
136
+
- the helper writes `exit_code` to `GITHUB_OUTPUT`
137
+
- the workflow uploads the log first, then fails in a separate step if `exit_code != 0`
138
+
139
+
Artifact:
140
+
141
+
-`sdk-tests-log-<runner>-xcode-<xcode>`
84
142
85
143
### `lint_pods`
86
144
87
145
What it does:
88
146
89
-
- runs `pod lib lint` for published podspecs
147
+
- runs `pod lib lint` for:
148
+
-`Adapty.podspec`
149
+
-`AdaptyUI.podspec`
150
+
-`AdaptyPlugin.podspec`
151
+
152
+
Scripts involved:
153
+
154
+
-`scripts/ci/sdk_validation/run-pod-lib-lint.sh`
155
+
-`scripts/ci/sdk_validation/lib/logging.sh`
90
156
91
157
Inputs that affect it:
92
158
93
159
-`lint_pods`
94
160
95
161
Behavior:
96
162
97
-
- strict failure
98
-
- no whitelist support
99
-
- runs on `sdk_tests.runner` + `sdk_tests.xcode`
163
+
- blocking
164
+
- runs only on `sdk_tests.runner + sdk_tests.xcode`
165
+
- there is no whitelist mechanism
166
+
167
+
Artifact:
168
+
169
+
-`pod-lib-lint-log-xcode-<xcode>`
170
+
171
+
## Logging Model
172
+
173
+
All artifact-producing shell helpers use the same logging contract from `scripts/ci/sdk_validation/lib/logging.sh`.
174
+
175
+
After log initialization:
176
+
177
+
- stdout and stderr are mirrored to both live Actions output and the log file
178
+
- early failures are written into the artifact log
179
+
- helpers must not use extra `tee -a` logging on top of the shared logger
180
+
181
+
Current artifact-owning helpers:
182
+
183
+
-`build-spm-library-targets.sh`
184
+
-`build-demo-app.sh`
185
+
-`run-sdk-tests.sh`
186
+
-`run-pod-lib-lint.sh`
187
+
188
+
Special cases:
189
+
190
+
-`build-demo-app.sh` and `run-sdk-tests.sh` intentionally do not fail their step on command non-zero
191
+
- instead, they store `exit_code` in `GITHUB_OUTPUT`, so the workflow can upload the log artifact before failing
100
192
101
193
## Manual Run Inputs
102
194
103
195
### Boolean flags
104
196
105
-
-`build_sdk_targets`: enable the SDK build flow
106
-
-`build_test_app`: enable the test app build flow
107
-
-`run_tests`: enable the `swift test` flow
108
-
-`lint_pods`: enable the CocoaPods lint flow
197
+
-`build_sdk_targets`: enable SDK builds
198
+
-`build_test_app`: enable demo app build
199
+
-`run_tests`: enable `swift test`
200
+
-`lint_pods`: enable CocoaPods lint
109
201
110
202
At least one of these flags must be `true`.
111
203
112
204
### JSON overrides
113
205
114
-
-`build_matrix_override_json`: optional override for SDK build flow and primary entry selection for the test app
115
-
-`sdk_tests_matrix_override_json`: optional override for the `swift test` matrix; entries may use `informational: true` to make a test run non-blocking
206
+
-`build_matrix_override_json`: override for SDK build matrix and primary build entry selection
207
+
-`sdk_tests_matrix_override_json`: override for `swift test` matrix
208
+
209
+
Accepted formats:
210
+
211
+
- JSON array of matrix entries
212
+
- JSON object with `include: [...]`
213
+
214
+
Matrix entry shape:
215
+
216
+
```json
217
+
{
218
+
"runner": "macos-15",
219
+
"xcode": "26.2",
220
+
"informational": false
221
+
}
222
+
```
223
+
224
+
Rules:
225
+
226
+
-`runner + xcode` pairs must be unique
227
+
-`informational: true` means the matrix entry is advisory and uses `continue-on-error`
228
+
- if `build_sdk_targets=true` or `build_test_app=true`, `build_matrix` must include the primary `sdk_tests` entry with `informational: false`
229
+
-`sdk_tests_matrix_override_json` may omit the primary `sdk_tests` entry entirely for custom test-only runs
116
230
117
231
## Validation Rules
118
232
119
-
- Boolean defaults in `workflow_dispatch` must stay in sync with `.github/ci/ci-run-config.json`.
120
-
-`Prepare CI config` fails if all four boolean flags are `false`.
121
-
- Matrix override JSON must be a non-empty array or an object with `include[]`.
122
-
- Matrix entries must be unique by `runner + xcode`.
123
-
- If `build_sdk_targets=true` or `build_test_app=true`, `build_matrix` must include the primary `sdk_tests` entry (`runner + xcode`).
124
-
-`sdk_tests_matrix_override_json` does not require the primary `sdk_tests` entry; it can be used for custom test-only runs.
233
+
-`Prepare CI config` fails if all four boolean flags are `false`
234
+
- workflow input defaults in `workflow_dispatch` must stay in sync with `.github/ci/ci-run-config.json`
235
+
- matrix override JSON must be a non-empty array or an object with `include[]`
236
+
- matrix entries must be unique by `runner + xcode`
237
+
-`build_test_app` always derives a single-entry matrix from the primary build entry
125
238
126
239
## Xcode Selection Behavior
127
240
128
-
- Matrix jobs use `setup-xcode` for requested versions.
129
-
- If a matrix entry is `informational: true` and Xcode is unavailable, that entry is skipped with a warning.
130
-
- If a matrix entry is `informational: false` and Xcode is unavailable, that entry fails.
131
-
- For matrix jobs, `informational: true` also means the entry uses `continue-on-error` and does not block the whole workflow if the build/test command fails.
132
-
- One-Xcode jobs (`SDK macOS build`, `CocoaPods lint`) fail if the configured Xcode is unavailable.
133
-
- iOS-specific steps (`Adapty-Package` and `AdaptyRecipes-SwiftUI`) run only on the primary `sdk_tests` entry (`runner + xcode`).
241
+
- matrix jobs use `setup-xcode` for the requested version
242
+
- if a matrix entry is `informational: true` and Xcode is unavailable, that entry is skipped with a warning
243
+
- if a matrix entry is `informational: false` and Xcode is unavailable, that entry fails
244
+
-`SDK macOS build` and `CocoaPods lint` are single-Xcode jobs and fail if the configured Xcode is unavailable
245
+
- iOS-specific steps (`Adapty-Package` and `AdaptyRecipes-SwiftUI`) run only on the primary `sdk_tests.runner + sdk_tests.xcode`
134
246
135
247
## Manual Run Guide
136
248
@@ -143,14 +255,6 @@ At least one of these flags must be `true`.
143
255
5. Leave the default profile or override flags/JSON inputs.
0 commit comments