@@ -134,6 +134,8 @@ jobs:
134
134
WINDOWS_CMAKE_CXX_FLAGS : ${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}
135
135
WINDOWS_CMAKE_EXE_LINKER_FLAGS : ${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}
136
136
WINDOWS_CMAKE_SHARED_LINKER_FLAGS : ${{ steps.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }}
137
+ DARWIN_CMAKE_C_FLAGS : ${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}
138
+ DARWIN_CMAKE_CXX_FLAGS : ${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}
137
139
ANDROID_CMAKE_C_FLAGS : ${{ steps.context.outputs.ANDROID_CMAKE_C_FLAGS }}
138
140
ANDROID_CMAKE_CXX_FLAGS : ${{ steps.context.outputs.ANDROID_CMAKE_CXX_FLAGS }}
139
141
ANDROID_CMAKE_EXE_LINKER_FLAGS : ${{ steps.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }}
@@ -144,7 +146,10 @@ jobs:
144
146
swift_version : ${{ steps.context.outputs.swift_version }}
145
147
swift_tag : ${{ steps.context.outputs.swift_tag }}
146
148
windows_build_runner : ${{ steps.context.outputs.windows_build_runner }}
147
- compilers_build_runner : ${{ steps.context.outputs.compilers_build_runner }}
149
+ windows_compilers_runner : ${{ steps.context.outputs.windows_compilers_runner }}
150
+ mac_build_runner : ${{ steps.context.outputs.mac_build_runner }}
151
+ windows_host_matrix : ${{ steps.setup-matrix.outputs.windows_host_matrix }}
152
+ darwin_host_matrix : ${{ steps.setup-matrix.outputs.darwin_host_matrix }}
148
153
steps :
149
154
- id : context
150
155
name : Generate Build Context
@@ -219,6 +224,8 @@ jobs:
219
224
echo debug_info=true >> ${GITHUB_OUTPUT}
220
225
echo WINDOWS_CMAKE_C_FLAGS="/GS- /Gw /Gy /Oi /Oy /Z7 /Zc:inline /Zc:preprocessor" >> ${GITHUB_OUTPUT}
221
226
echo WINDOWS_CMAKE_CXX_FLAGS="/GS- /Gw /Gy /Oi /Oy /Z7 /Zc:inline /Zc:preprocessor /Zc:__cplusplus /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" >> ${GITHUB_OUTPUT}
227
+ echo DARWIN_CMAKE_C_FLAGS="-g" >> ${GITHUB_OUTPUT}
228
+ echo DARWIN_CMAKE_CXX_FLAGS="-g" >> ${GITHUB_OUTPUT}
222
229
echo ANDROID_CMAKE_C_FLAGS="-ffunction-sections -fdata-sections -g" >> ${GITHUB_OUTPUT}
223
230
echo ANDROID_CMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections -g" >> ${GITHUB_OUTPUT}
224
231
echo WINDOWS_CMAKE_EXE_LINKER_FLAGS="-incremental:no -debug -opt:ref -opt:icf" >> ${GITHUB_OUTPUT}
@@ -228,6 +235,8 @@ jobs:
228
235
echo debug_info=false >> ${GITHUB_OUTPUT}
229
236
echo WINDOWS_CMAKE_C_FLAGS="/GS- /Gw /Gy /Oi /Oy /Zc:inline /Zc:preprocessor" >> ${GITHUB_OUTPUT}
230
237
echo WINDOWS_CMAKE_CXX_FLAGS="/GS- /Gw /Gy /Oi /Oy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" >> ${GITHUB_OUTPUT}
238
+ echo DARWIN_CMAKE_C_FLAGS="" >> ${GITHUB_OUTPUT}
239
+ echo DARWIN_CMAKE_CXX_FLAGS="" >> ${GITHUB_OUTPUT}
231
240
echo ANDROID_CMAKE_C_FLAGS="-ffunction-sections -fdata-sections" >> ${GITHUB_OUTPUT}
232
241
echo ANDROID_CMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections" >> ${GITHUB_OUTPUT}
233
242
echo WINDOWS_CMAKE_EXE_LINKER_FLAGS="" >> ${GITHUB_OUTPUT}
@@ -256,7 +265,9 @@ jobs:
256
265
fi
257
266
258
267
echo windows_build_runner=${{ inputs.windows_default_runner || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
259
- echo compilers_build_runner=${{ inputs.windows_compilers_runner || inputs.windows_default_runner || vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
268
+ echo windows_compilers_runner=${{ inputs.windows_compilers_runner || inputs.windows_default_runner || vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
269
+ # TODO: Make the mac runner configurable.
270
+ echo mac_build_runner=macos-latest >> ${GITHUB_OUTPUT}
260
271
261
272
echo ANDROID_API_LEVEL=${{ inputs.android_api_level }} >> ${GITHUB_OUTPUT}
262
273
@@ -266,11 +277,62 @@ jobs:
266
277
path : stable.xml
267
278
if-no-files-found : ignore
268
279
280
+ - name : Setup matrix
281
+ id : setup-matrix
282
+ env :
283
+ WINDOWS_HOST_MATRIX : >-
284
+ {
285
+ "include": [
286
+ {
287
+ "arch": "amd64",
288
+ "os": "Windows",
289
+ "cc": "cl",
290
+ "ccflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}",
291
+ "cxx": "cl",
292
+ "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}"
293
+ },
294
+ {
295
+ "arch": "arm64",
296
+ "os": "Windows",
297
+ "cc": "cl",
298
+ "ccflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}",
299
+ "cxx": "cl",
300
+ "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}"
301
+ }
302
+ ]
303
+ }
304
+ DARWIN_HOST_MATRIX : >-
305
+ {
306
+ "include": [
307
+ {
308
+ "arch": "x86_64",
309
+ "os": "Darwin",
310
+ "cc": "clang",
311
+ "ccflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}",
312
+ "cxx": "clang++",
313
+ "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}"
314
+ },
315
+ {
316
+ "arch": "aarch64",
317
+ "os": "Darwin",
318
+ "cc": "clang",
319
+ "ccflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}",
320
+ "cxx": "clang++",
321
+ "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}"
322
+ }
323
+ ]
324
+ }
325
+ run : |
326
+ echo "windows_host_matrix=$(jq -r -c '.' <<< ${WINDOWS_HOST_MATRIX})" >> ${GITHUB_OUTPUT}
327
+ echo "darwin_host_matrix=$(jq -r -c '.' <<< ${DARWIN_HOST_MATRIX})" >> ${GITHUB_OUTPUT}
328
+
269
329
windows-build :
270
330
needs : [context]
271
331
name : Windows Swift Toolchains Build
272
332
uses : ./.github/workflows/swift-toolchain.yml
273
333
with :
334
+ build_os : Windows
335
+ build_arch : amd64
274
336
curl_revision : ${{ needs.context.outputs.curl_revision }}
275
337
indexstore_db_revision : ${{ needs.context.outputs.indexstore_db_revision }}
276
338
libxml2_revision : ${{ needs.context.outputs.libxml2_revision }}
@@ -319,7 +381,72 @@ jobs:
319
381
swift_version : ${{ needs.context.outputs.swift_version }}
320
382
swift_tag : ${{ needs.context.outputs.swift_tag }}
321
383
default_build_runner : ${{ needs.context.outputs.windows_build_runner }}
322
- compilers_build_runner : ${{ needs.context.outputs.compilers_build_runner }}
384
+ compilers_build_runner : ${{ needs.context.outputs.windows_compilers_runner }}
385
+ host_matrix : ${{ needs.context.outputs.windows_host_matrix }}
386
+ secrets :
387
+ SYMBOL_SERVER_PAT : ${{ secrets.SYMBOL_SERVER_PAT }}
388
+ CERTIFICATE : ${{ secrets.CERTIFICATE }}
389
+ PASSPHRASE : ${{ secrets.PASSPHRASE }}
390
+
391
+ mac-build :
392
+ # TODO: Enable the mac build.
393
+ if : false
394
+ needs : [context]
395
+ name : macOS Swift Toolchains Build
396
+ uses : ./.github/workflows/swift-toolchain.yml
397
+ with :
398
+ build_os : Darwin
399
+ build_arch : aarch64
400
+ curl_revision : ${{ needs.context.outputs.curl_revision }}
401
+ indexstore_db_revision : ${{ needs.context.outputs.indexstore_db_revision }}
402
+ libxml2_revision : ${{ needs.context.outputs.libxml2_revision }}
403
+ llvm_project_revision : ${{ needs.context.outputs.llvm_project_revision }}
404
+ sourcekit_lsp_revision : ${{ needs.context.outputs.sourcekit_lsp_revision }}
405
+ swift_argument_parser_revision : ${{ needs.context.outputs.swift_argument_parser_revision }}
406
+ swift_asn1_revision : ${{ needs.context.outputs.swift_asn1_revision }}
407
+ swift_atomics_revision : ${{ needs.context.outputs.swift_atomics_revision }}
408
+ swift_certificates_revision : ${{ needs.context.outputs.swift_certificates_revision }}
409
+ swift_cmark_revision : ${{ needs.context.outputs.swift_cmark_revision }}
410
+ swift_collections_revision : ${{ needs.context.outputs.swift_collections_revision }}
411
+ swift_corelibs_foundation_revision : ${{ needs.context.outputs.swift_corelibs_foundation_revision }}
412
+ swift_corelibs_libdispatch_revision : ${{ needs.context.outputs.swift_corelibs_libdispatch_revision }}
413
+ swift_corelibs_xctest_revision : ${{ needs.context.outputs.swift_corelibs_xctest_revision }}
414
+ swift_crypto_revision : ${{ needs.context.outputs.swift_crypto_revision }}
415
+ swift_driver_revision : ${{ needs.context.outputs.swift_driver_revision }}
416
+ swift_experimental_string_processing_revision : ${{ needs.context.outputs.swift_experimental_string_processing_revision }}
417
+ swift_format_revision : ${{ needs.context.outputs.swift_format_revision }}
418
+ swift_foundation_revision : ${{ needs.context.outputs.swift_foundation_revision }}
419
+ swift_foundation_icu_revision : ${{ needs.context.outputs.swift_foundation_icu_revision }}
420
+ swift_installer_scripts_revision : ${{ needs.context.outputs.swift_installer_scripts_revision }}
421
+ swift_llbuild_revision : ${{ needs.context.outputs.swift_llbuild_revision }}
422
+ swift_markdown_revision : ${{ needs.context.outputs.swift_markdown_revision }}
423
+ swift_package_manager_revision : ${{ needs.context.outputs.swift_package_manager_revision }}
424
+ swift_revision : ${{ needs.context.outputs.swift_revision }}
425
+ swift_syntax_revision : ${{ needs.context.outputs.swift_syntax_revision }}
426
+ swift_system_revision : ${{ needs.context.outputs.swift_system_revision }}
427
+ swift_testing_revision : ${{ needs.context.outputs.swift_testing_revision }}
428
+ swift_toolchain_sqlite_revision : ${{ needs.context.outputs.swift_toolchain_sqlite_revision }}
429
+ swift_toolchain_sqlite_version : ${{ needs.context.outputs.swift_toolchain_sqlite_version }}
430
+ swift_tools_support_core_revision : ${{ needs.context.outputs.swift_tools_support_core_revision }}
431
+ yams_revision : ${{ needs.context.outputs.yams_revision }}
432
+ zlib_revision : ${{ needs.context.outputs.zlib_revision }}
433
+ ANDROID_API_LEVEL : ${{ needs.context.outputs.ANDROID_API_LEVEL }}
434
+ WINDOWS_CMAKE_C_FLAGS : ${{ needs.context.outputs.WINDOWS_CMAKE_C_FLAGS }}
435
+ WINDOWS_CMAKE_CXX_FLAGS : ${{ needs.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}
436
+ WINDOWS_CMAKE_EXE_LINKER_FLAGS : ${{ needs.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}
437
+ WINDOWS_CMAKE_SHARED_LINKER_FLAGS : ${{ needs.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }}
438
+ ANDROID_CMAKE_C_FLAGS : ${{ needs.context.outputs.ANDROID_CMAKE_C_FLAGS }}
439
+ ANDROID_CMAKE_CXX_FLAGS : ${{ needs.context.outputs.ANDROID_CMAKE_CXX_FLAGS }}
440
+ ANDROID_CMAKE_EXE_LINKER_FLAGS : ${{ needs.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }}
441
+ ANDROID_CMAKE_SHARED_LINKER_FLAGS : ${{ needs.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }}
442
+ CMAKE_Swift_FLAGS : ${{ needs.context.outputs.CMAKE_Swift_FLAGS }}
443
+ debug_info : ${{ needs.context.outputs.debug_info }}
444
+ signed : ${{ needs.context.outputs.signed }}
445
+ swift_version : ${{ needs.context.outputs.swift_version }}
446
+ swift_tag : ${{ needs.context.outputs.swift_tag }}
447
+ default_build_runner : ${{ needs.context.outputs.mac_build_runner }}
448
+ compilers_build_runner : ${{ needs.context.outputs.mac_build_runner }}
449
+ host_matrix : ${{ needs.context.outputs.darwin_host_matrix }}
323
450
secrets :
324
451
SYMBOL_SERVER_PAT : ${{ secrets.SYMBOL_SERVER_PAT }}
325
452
CERTIFICATE : ${{ secrets.CERTIFICATE }}
0 commit comments