33
33
default : " [\" jammy\" ]"
34
34
linux_static_sdk_versions :
35
35
type : string
36
- description : " Linux Swift static SDK version list (JSON)"
36
+ description : " Static Linux Swift SDK version list (JSON)"
37
37
default : " [\" nightly-6.2\" ]"
38
38
wasm_sdk_versions :
39
39
type : string
40
- description : " Swift Wasm SDK version list (JSON)"
41
- default : " [\" nightly-6.2\" ]"
40
+ description : " Wasm Swift SDK version list (JSON)"
41
+ default : " [\" nightly-main\" , \" nightly-6.2\" ]"
42
+ wasm_exclude_swift_versions :
43
+ type : string
44
+ description : " Exclude Wasm Swift SDK version list (JSON)"
45
+ default : " [{\" swift_version\" : \"\" }]"
42
46
windows_swift_versions :
43
47
type : string
44
48
description : " Include Windows Swift version list (JSON)"
61
65
default : " "
62
66
linux_static_sdk_pre_build_command :
63
67
type : string
64
- description : " Linux command to execute before building the Swift package with the static SDK"
68
+ description : " Linux command to execute before building the Swift package with the Static Linux Swift SDK"
65
69
default : " "
66
70
wasm_sdk_pre_build_command :
67
71
type : string
68
- description : " Linux command to execute before building the Swift package with the Wasm SDK"
72
+ description : " Linux command to execute before building the Swift package with the Embedded Swift SDK for Wasm "
69
73
default : " "
70
74
macos_pre_build_command :
71
75
type : string
@@ -113,11 +117,15 @@ on:
113
117
default : true
114
118
enable_linux_static_sdk_build :
115
119
type : boolean
116
- description : " Boolean to enable building with the Linux static SDK. Defaults to false"
120
+ description : " Boolean to enable building with the Static Linux Swift SDK. Defaults to false"
117
121
default : false
118
122
enable_wasm_sdk_build :
119
123
type : boolean
120
- description : " Boolean to enable building with the Wasm SDK. Defaults to false"
124
+ description : " Boolean to enable building with the Swift SDK for Wasm. Defaults to false"
125
+ default : false
126
+ enable_embedded_wasm_sdk_build :
127
+ type : boolean
128
+ description : " Boolean to enable building with the Embedded Swift SDK for Wasm. Defaults to false"
121
129
default : false
122
130
enable_macos_checks :
123
131
type : boolean
@@ -208,7 +216,7 @@ jobs:
208
216
run : ${{ inputs.linux_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
209
217
210
218
linux-static-sdk-build :
211
- name : Linux Static SDK Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
219
+ name : Static Linux Swift SDK Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
212
220
if : ${{ inputs.enable_linux_static_sdk_build }}
213
221
runs-on : ubuntu-latest
214
222
strategy :
@@ -236,7 +244,7 @@ jobs:
236
244
done
237
245
- name : Pre-build
238
246
run : ${{ inputs.linux_pre_build_command }}
239
- - name : Install static SDK and build
247
+ - name : Install Static Linux Swift SDK and build
240
248
env :
241
249
BUILD_FLAGS : ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
242
250
run : |
@@ -246,14 +254,16 @@ jobs:
246
254
bash -s -- --static --flags="$BUILD_FLAGS" --build-command="${{ inputs.linux_static_sdk_build_command }}" ${{ matrix.swift_version }}
247
255
248
256
wasm-sdk-build :
249
- name : Wasm SDK Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
257
+ name : Swift SDK for Wasm Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
250
258
if : ${{ inputs.enable_wasm_sdk_build }}
251
259
runs-on : ubuntu-latest
252
260
strategy :
253
261
fail-fast : false
254
262
matrix :
255
263
swift_version : ${{ fromJson(inputs.wasm_sdk_versions) }}
256
264
os_version : ${{ fromJson(inputs.linux_os_versions) }}
265
+ exclude :
266
+ - ${{ fromJson(inputs.wasm_exclude_swift_versions) }}
257
267
container :
258
268
image : ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
259
269
steps :
@@ -274,7 +284,7 @@ jobs:
274
284
done
275
285
- name : Pre-build
276
286
run : ${{ inputs.linux_pre_build_command }}
277
- - name : Install Wasm SDK and build
287
+ - name : Install Swift SDK for Wasm and build
278
288
env :
279
289
BUILD_FLAGS : ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
280
290
run : |
@@ -283,6 +293,46 @@ jobs:
283
293
curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
284
294
bash -s -- --wasm --flags="$BUILD_FLAGS" --build-command="${{ inputs.wasm_sdk_build_command }}" ${{ matrix.swift_version }}
285
295
296
+ embedded-wasm-sdk-build :
297
+ name : Embedded Swift SDK for Wasm Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
298
+ if : ${{ inputs.enable_embedded_wasm_sdk_build }}
299
+ runs-on : ubuntu-latest
300
+ strategy :
301
+ fail-fast : false
302
+ matrix :
303
+ swift_version : ${{ fromJson(inputs.wasm_sdk_versions) }}
304
+ os_version : ${{ fromJson(inputs.linux_os_versions) }}
305
+ exclude :
306
+ - ${{ fromJson(inputs.wasm_exclude_swift_versions) }}
307
+ container :
308
+ image : ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
309
+ steps :
310
+ - name : Swift version
311
+ run : swift --version
312
+ - name : Checkout repository
313
+ uses : actions/checkout@v4
314
+ - name : Provide token
315
+ if : ${{ inputs.needs_token }}
316
+ run : |
317
+ echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
318
+ - name : Set environment variables
319
+ if : ${{ inputs.linux_env_vars }}
320
+ run : |
321
+ for i in "${{ inputs.linux_env_vars }}"
322
+ do
323
+ printf "%s\n" $i >> $GITHUB_ENV
324
+ done
325
+ - name : Pre-build
326
+ run : ${{ inputs.linux_pre_build_command }}
327
+ - name : Install Swift SDK for Wasm and build
328
+ env :
329
+ BUILD_FLAGS : ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
330
+ run : |
331
+ ${{ inputs.wasm_sdk_pre_build_command }}
332
+ which curl || (apt -q update && apt -yq install curl)
333
+ curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
334
+ bash -s -- --embedded-wasm --flags="$BUILD_FLAGS" ${{ matrix.swift_version }}
335
+
286
336
windows-build :
287
337
name : Windows (${{ matrix.swift_version }} - windows-2022)
288
338
if : ${{ inputs.enable_windows_checks }}
0 commit comments