Development Snapshot #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Development Snapshot | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| repo_url: | |
| description: 'Repo Manifest URL' | |
| default: 'https://github.com/compnerd/swift-build' | |
| required: false | |
| type: string | |
| swift_version: | |
| description: 'Swift Version' | |
| default: '0.0.0' | |
| required: false | |
| type: string | |
| android_api_level: | |
| description: 'Android API Level' | |
| default: 28 | |
| required: false | |
| type: number | |
| swift_tag: | |
| description: 'Swift Build Tag' | |
| required: false | |
| type: string | |
| debug_info: | |
| description: 'Emit PDBs (Debug Info)' | |
| default: false | |
| type: boolean | |
| signed: | |
| description: 'Code Sign' | |
| default: false | |
| type: boolean | |
| create_release: | |
| description: 'Create Release' | |
| type: boolean | |
| default: true | |
| required: false | |
| create_snapshot: | |
| description: 'Create Snapshot' | |
| type: boolean | |
| default: true | |
| required: false | |
| build_android: | |
| description: 'Build Android SDK' | |
| required: false | |
| default: false | |
| type: boolean | |
| stable_point: | |
| description: 'Use Repo Smart Sync' | |
| type: boolean | |
| default: false | |
| required: false | |
| workflow_call: | |
| inputs: | |
| repo_url: | |
| description: 'Repo Manifest URL' | |
| default: 'https://github.com/compnerd/swift-build' | |
| required: false | |
| type: string | |
| swift_version: | |
| description: 'Swift Version' | |
| default: '0.0.0' | |
| required: false | |
| type: string | |
| android_api_level: | |
| description: 'Android API Level' | |
| default: 28 | |
| required: false | |
| type: number | |
| swift_tag: | |
| description: 'Swift Build Tag' | |
| required: false | |
| type: string | |
| debug_info: | |
| description: 'Emit PDBs (Debug Info)' | |
| default: true | |
| type: boolean | |
| signed: | |
| description: 'Code Sign' | |
| default: false | |
| type: boolean | |
| create_release: | |
| description: 'Create Release' | |
| type: boolean | |
| default: true | |
| required: false | |
| create_snapshot: | |
| description: 'Create Snapshot' | |
| type: boolean | |
| default: true | |
| required: false | |
| windows_x64_default_runner: | |
| description: 'X64 Build runner' | |
| required: false | |
| type: string | |
| windows_arm64_default_runner: | |
| description: 'ARM64 Build runner' | |
| required: false | |
| type: string | |
| windows_x64_compilers_runner: | |
| description: 'X64 Build runner for `compilers` job' | |
| required: false | |
| type: string | |
| windows_arm64_compilers_runner: | |
| description: 'ARM64 Build runner for `compilers` job' | |
| required: false | |
| type: string | |
| windows_build_arch: | |
| description: 'Windows build architecture' | |
| required: false | |
| type: string | |
| build_android: | |
| description: 'Build Android SDK' | |
| required: false | |
| default: false | |
| type: boolean | |
| secrets: | |
| SYMBOL_SERVER_PAT: | |
| required: true | |
| CERTIFICATE: | |
| required: true | |
| PASSPHRASE: | |
| required: true | |
| jobs: | |
| context: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| curl_revision: ${{ steps.context.outputs.curl_revision }} | |
| curl_version: ${{ steps.context.outputs.curl_version }} | |
| ds2_revision: ${{ steps.context.outputs.ds2_revision }} | |
| indexstore_db_revision: ${{ steps.context.outputs.indexstore_db_revision }} | |
| libxml2_revision: ${{ steps.context.outputs.libxml2_revision }} | |
| libxml2_version: ${{ steps.context.outputs.libxml2_version }} | |
| llvm_project_revision: ${{ steps.context.outputs.llvm_project_revision }} | |
| mimalloc_revision: ${{ steps.context.outputs.mimalloc_revision }} | |
| sourcekit_lsp_revision: ${{ steps.context.outputs.sourcekit_lsp_revision }} | |
| swift_argument_parser_revision: ${{ steps.context.outputs.swift_argument_parser_revision }} | |
| swift_asn1_revision: ${{ steps.context.outputs.swift_asn1_revision }} | |
| swift_atomics_revision: ${{ steps.context.outputs.swift_atomics_revision }} | |
| swift_build_revision: ${{ steps.context.outputs.swift_build_revision }} | |
| swift_certificates_revision: ${{ steps.context.outputs.swift_certificates_revision }} | |
| swift_cmark_revision: ${{ steps.context.outputs.swift_cmark_revision }} | |
| swift_cmark_version: ${{ steps.context.outputs.swift_cmark_version }} | |
| swift_collections_revision: ${{ steps.context.outputs.swift_collections_revision }} | |
| swift_corelibs_foundation_revision: ${{ steps.context.outputs.swift_corelibs_foundation_revision }} | |
| swift_corelibs_libdispatch_revision: ${{ steps.context.outputs.swift_corelibs_libdispatch_revision }} | |
| swift_corelibs_xctest_revision: ${{ steps.context.outputs.swift_corelibs_xctest_revision }} | |
| swift_crypto_revision: ${{ steps.context.outputs.swift_crypto_revision }} | |
| swift_driver_revision: ${{ steps.context.outputs.swift_driver_revision }} | |
| swift_experimental_string_processing_revision: ${{ steps.context.outputs.swift_experimental_string_processing_revision }} | |
| swift_format_revision: ${{ steps.context.outputs.swift_format_revision }} | |
| swift_foundation_revision: ${{ steps.context.outputs.swift_foundation_revision }} | |
| swift_foundation_icu_revision: ${{ steps.context.outputs.swift_foundation_icu_revision }} | |
| swift_installer_scripts_revision: ${{ steps.context.outputs.swift_installer_scripts_revision }} | |
| swift_llbuild_revision: ${{ steps.context.outputs.swift_llbuild_revision }} | |
| swift_lmdb_revision: ${{ steps.context.outputs.swift_lmdb_revision }} | |
| swift_markdown_revision: ${{ steps.context.outputs.swift_markdown_revision }} | |
| swift_package_manager_revision: ${{ steps.context.outputs.swift_package_manager_revision }} | |
| swift_revision: ${{ steps.context.outputs.swift_revision }} | |
| swift_syntax_revision: ${{ steps.context.outputs.swift_syntax_revision }} | |
| swift_system_revision: ${{ steps.context.outputs.swift_system_revision }} | |
| swift_testing_revision: ${{ steps.context.outputs.swift_testing_revision }} | |
| swift_toolchain_sqlite_revision: ${{ steps.context.outputs.swift_toolchain_sqlite_revision }} | |
| swift_toolchain_sqlite_version: ${{ steps.context.outputs.swift_toolchain_sqlite_version }} | |
| swift_tools_support_core_revision: ${{ steps.context.outputs.swift_tools_support_core_revision }} | |
| zlib_revision: ${{ steps.context.outputs.zlib_revision }} | |
| zlib_version: ${{ steps.context.outputs.zlib_version }} | |
| ANDROID_API_LEVEL: ${{ steps.context.outputs.ANDROID_API_LEVEL }} | |
| WINDOWS_CMAKE_C_FLAGS: ${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }} | |
| WINDOWS_CMAKE_CXX_FLAGS: ${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }} | |
| WINDOWS_CMAKE_EXE_LINKER_FLAGS: ${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }} | |
| WINDOWS_CMAKE_SHARED_LINKER_FLAGS: ${{ steps.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }} | |
| DARWIN_CMAKE_C_FLAGS: ${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }} | |
| DARWIN_CMAKE_CXX_FLAGS: ${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }} | |
| DARWIN_CMAKE_EXE_LINKER_FLAGS: ${{ steps.context.outputs.DARWIN_CMAKE_EXE_LINKER_FLAGS }} | |
| DARWIN_CMAKE_SHARED_LINKER_FLAGS: ${{ steps.context.outputs.DARWIN_CMAKE_SHARED_LINKER_FLAGS }} | |
| ANDROID_CLANG_VERSION: ${{ steps.context.outputs.ANDROID_CLANG_VERSION }} | |
| ANDROID_CMAKE_C_FLAGS: ${{ steps.context.outputs.ANDROID_CMAKE_C_FLAGS }} | |
| ANDROID_CMAKE_CXX_FLAGS: ${{ steps.context.outputs.ANDROID_CMAKE_CXX_FLAGS }} | |
| ANDROID_CMAKE_EXE_LINKER_FLAGS: ${{ steps.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }} | |
| ANDROID_CMAKE_SHARED_LINKER_FLAGS: ${{ steps.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }} | |
| ANDROID_NDK_VERSION: ${{ steps.context.outputs.ANDROID_NDK_VERSION }} | |
| WINDOWS_CMAKE_Swift_FLAGS: ${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }} | |
| DARWIN_CMAKE_Swift_FLAGS: ${{ steps.context.outputs.DARWIN_CMAKE_Swift_FLAGS }} | |
| debug_info: ${{ steps.context.outputs.debug_info }} | |
| signed: ${{ steps.context.outputs.signed }} | |
| swift_version: ${{ steps.context.outputs.swift_version }} | |
| swift_tag: ${{ steps.context.outputs.swift_tag }} | |
| windows_arm64_build_runner: ${{ steps.context.outputs.windows_arm64_build_runner }} | |
| windows_arm64_compilers_runner: ${{ steps.context.outputs.windows_arm64_compilers_runner }} | |
| windows_build_arch: ${{ steps.context.outputs.windows_build_arch }} | |
| windows_build_cpu: ${{ steps.context.outputs.windows_build_cpu }} | |
| windows_x64_build_runner: ${{ steps.context.outputs.windows_x64_build_runner }} | |
| windows_x64_compilers_runner: ${{ steps.context.outputs.windows_x64_compilers_runner }} | |
| mac_build_runner: ${{ steps.context.outputs.mac_build_runner }} | |
| windows_arm64_build_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_build_matrix }} | |
| windows_arm64_host_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_host_matrix }} | |
| windows_arm64_compilers_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_compilers_matrix }} | |
| windows_arm64_target_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_target_matrix }} | |
| windows_x64_build_matrix: ${{ steps.setup-matrix.outputs.windows_x64_build_matrix }} | |
| windows_x64_host_matrix: ${{ steps.setup-matrix.outputs.windows_x64_host_matrix }} | |
| windows_x64_compilers_matrix: ${{ steps.setup-matrix.outputs.windows_x64_compilers_matrix }} | |
| windows_x64_target_matrix: ${{ steps.setup-matrix.outputs.windows_x64_target_matrix }} | |
| darwin_host_matrix: ${{ steps.setup-matrix.outputs.darwin_host_matrix }} | |
| darwin_compilers_matrix: ${{ steps.setup-matrix.outputs.darwin_compilers_matrix }} | |
| darwin_build_matrix: ${{ steps.setup-matrix.outputs.darwin_build_matrix }} | |
| darwin_target_matrix: ${{ steps.setup-matrix.outputs.darwin_target_matrix }} | |
| steps: | |
| - id: context | |
| name: Generate Build Context | |
| run: | | |
| # TODO(compnerd) can we make this more silent? | |
| sudo DEBIAN_FRONTEND=noninteractive apt-get -qq update -yq | |
| sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -o Dpkg::Use-Pty=0 install -yq repo libxml2-utils | |
| # Which branch is this workflow based on | |
| branch_version_string=${{ inputs.swift_version || '0.0.0' }} | |
| if [[ $branch_version_string == *.* ]]; then | |
| branch_name=$(echo ${branch_version_string} | awk -F. '{ ver=$1"."$2; print (ver == "0.0") ? "main" : "release/"ver }') | |
| else | |
| branch_name="release/$branch_version_string" | |
| fi | |
| repo init --quiet --groups default --depth 1 -u ${{ inputs.repo_url }} -b $branch_name | |
| repo sync --quiet --no-clone-bundle --no-tags --jobs $(nproc --all) | |
| if [[ "${{ inputs.swift_tag }}" != "" ]] ; then | |
| tee -a "${GITHUB_OUTPUT}" <<-EOF | |
| indexstore_db_revision=refs/tags/${{ inputs.swift_tag }} | |
| llvm_project_revision=refs/tags/${{ inputs.swift_tag }} | |
| mimalloc_revision=refs/tags/v3.0.1 | |
| sourcekit_lsp_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_argument_parser_revision=refs/tags/1.4.0 | |
| swift_asn1_revision=refs/tags/1.0.0 | |
| swift_atomics_revision=refs/tags/1.2.0 | |
| swift_build_revision=refs/heads/main | |
| swift_certificates_revision=refs/tags/1.0.1 | |
| swift_cmark_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_collections_revision=refs/tags/1.1.3 | |
| swift_corelibs_foundation_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_corelibs_libdispatch_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_corelibs_xctest_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_crypto_revision=refs/tags/3.0.0 | |
| swift_driver_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_experimental_string_processing_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_format_revision=refs/heads/main | |
| swift_foundation_revison=refs/heads/main | |
| swift_foundation_icu_revision=refs/heads/main | |
| swift_installer_scripts_revision=refs/heads/main | |
| swift_llbuild_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_lmdb_revision=refs/heads/main | |
| swift_markdown_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_package_manager_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_syntax_revision=refs/tags/${{ inputs.swift_tag }} | |
| swift_system_revision=refs/tags/1.3.0 | |
| swift_testing_revision=refs/heads/main | |
| swift_toolchain_sqlite_revision=refs/tags/1.0.1 | |
| swift_tools_support_core_revision=refs/tags/${{ inputs.swift_tag }} | |
| curl_revision=refs/tags/curl-8_9_1 | |
| ds2_revision=refs/tags/nightly-2024-11-07 | |
| libxml2_revision=refs/tags/v2.11.5 | |
| zlib_revision=refs/tags/v1.3.1 | |
| EOF | |
| else | |
| repo manifest -r --suppress-upstream-revision --suppress-dest-branch | \ | |
| xmllint --xpath "//project/@name | //project/@revision" - | \ | |
| xargs -n2 | \ | |
| awk -F'[= ]' '{ | |
| split($2, repo, "/"); | |
| gsub(/-/, "_", repo[2]); | |
| print tolower(repo[2]) "_revision=" $4 | |
| }' | tee -a "${GITHUB_OUTPUT}" | |
| repo manifest -r --suppress-upstream-revision --suppress-dest-branch -o - | sed -E 's,[[:space:]]+$,,' > stable.xml | |
| fi | |
| echo libxml2_version=2.11.5 >> ${GITHUB_OUTPUT} | |
| echo curl_version=8.9.1 >> ${GITHUB_OUTPUT} | |
| echo swift_toolchain_sqlite_version=3.46.0 >> ${GITHUB_OUTPUT} | |
| echo swift_cmark_version=0.29.0.gfm.13 >> ${GITHUB_OUTPUT} | |
| echo zlib_version=1.3 >> ${GITHUB_OUTPUT} | |
| # FIXME(z2oh): Remove /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR when GitHub runner image updates to 20240610.1. | |
| # see: https://github.com/actions/runner-images/issues/10004 | |
| if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.debug_info }}" == "true" ]]; then | |
| echo debug_info=true >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_C_FLAGS="/GS- /Gw /Gy /Oi /Oy /Z7 /Zc:inline /Zc:preprocessor" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_CXX_FLAGS="/GS- /Gw /Gy /Oi /Oy /Z7 /Zc:inline /Zc:preprocessor /Zc:__cplusplus /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_C_FLAGS="-g" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_CXX_FLAGS="-g" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_EXE_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_SHARED_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo ANDROID_CMAKE_C_FLAGS="-ffunction-sections -fdata-sections -g -gsplit-dwarf" >> ${GITHUB_OUTPUT} | |
| echo ANDROID_CMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections -g -gsplit-dwarf" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_EXE_LINKER_FLAGS="-incremental:no -debug -opt:ref -opt:icf" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_SHARED_LINKER_FLAGS="-incremental:no -debug -opt:ref -opt:icf" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_Swift_FLAGS="-g -debug-info-format=codeview -Xlinker -debug -Xlinker -incremental:no -Xlinker -opt:ref -Xlinker -opt:icf" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_Swift_FLAGS="-g" >> ${GITHUB_OUTPUT} | |
| else | |
| echo debug_info=false >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_C_FLAGS="/GS- /Gw /Gy /Oi /Oy /Zc:inline /Zc:preprocessor" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_CXX_FLAGS="/GS- /Gw /Gy /Oi /Oy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_C_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_CXX_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_EXE_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_SHARED_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo ANDROID_CMAKE_C_FLAGS="-ffunction-sections -fdata-sections" >> ${GITHUB_OUTPUT} | |
| echo ANDROID_CMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_EXE_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_SHARED_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo WINDOWS_CMAKE_Swift_FLAGS="-Xlinker -incremental:no -Xlinker -opt:ref -Xlinker -opt:icf" >> ${GITHUB_OUTPUT} | |
| echo DARWIN_CMAKE_Swift_FLAGS="" >> ${GITHUB_OUTPUT} | |
| fi | |
| echo ANDROID_CMAKE_EXE_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| echo ANDROID_CMAKE_SHARED_LINKER_FLAGS="" >> ${GITHUB_OUTPUT} | |
| if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.signed }}" == "true" ]]; then | |
| # FIXME(compnerd) enable this when requested | |
| echo signed=false >> ${GITHUB_OUTPUT} | |
| else | |
| echo signed=false >> ${GITHUB_OUTPUT} | |
| fi | |
| echo swift_version=${{ inputs.swift_version || '0.0.0' }} | tee -a ${GITHUB_OUTPUT} | |
| if [[ -n "${{ inputs.swift_tag }}" ]] ; then | |
| echo swift_tag=${{ inputs.swift_tag }} | tee -a ${GITHUB_OUTPUT} | |
| else | |
| if [[ "$branch_name" == "main" ]] ; then | |
| echo swift_tag=$(date +%Y%m%d.$(date +%-H/6 | bc)) | tee -a ${GITHUB_OUTPUT} | |
| else | |
| echo swift_tag=swift-"$branch_version_string"-$(date +%Y%m%d.$(date +%-H/6 | bc)) | tee -a ${GITHUB_OUTPUT} | |
| fi | |
| fi | |
| echo windows_x64_build_runner=${{ inputs.windows_x64_default_runner || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} | |
| echo windows_x64_compilers_runner=${{ inputs.windows_x64_compilers_runner || inputs.windows_x64_default_runner || vars.WINDOWS_X64_COMPILERS_BUILD_RUNNER || vars.WINDOWS_X64_DEFAULT_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} | |
| echo windows_arm64_build_runner=${{ inputs.windows_arm64_default_runner || vars.WINDOWS_ARM64_DEFAULT_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} | |
| echo windows_arm64_compilers_runner=${{ inputs.windows_arm64_compilers_runner || inputs.windows_arm64_default_runner || vars.WINDOWS_ARM64_COMPILERS_BUILD_RUNNER || vars.WINDOWS_ARM64_DEFAULT_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} | |
| if [[ "${{ inputs.windows_build_arch }}" == "arm64" ]] ; then | |
| echo windows_build_arch=arm64 >> ${GITHUB_OUTPUT} | |
| echo windows_build_cpu=arm64 >> ${GITHUB_OUTPUT} | |
| else | |
| echo windows_build_arch=amd64 >> ${GITHUB_OUTPUT} | |
| echo windows_build_cpu=x64 >> ${GITHUB_OUTPUT} | |
| fi | |
| # TODO: Make the mac runner configurable. | |
| echo mac_build_runner=macos-latest >> ${GITHUB_OUTPUT} | |
| echo ANDROID_API_LEVEL=${{ inputs.android_api_level }} >> ${GITHUB_OUTPUT} | |
| echo ANDROID_NDK_VERSION=r27c >> ${GITHUB_OUTPUT} | |
| echo ANDROID_CLANG_VERSION=18 >> ${GITHUB_OUTPUT} | |
| - uses: actions/upload-artifact@v4 | |
| if: inputs.create_snapshot == true | |
| with: | |
| name: stable.xml | |
| path: stable.xml | |
| if-no-files-found: ignore | |
| - name: Setup matrix | |
| id: setup-matrix | |
| env: | |
| WINDOWS_X64_HOST_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "amd64", | |
| "cpu": "x86_64", | |
| "triple": "x86_64-unknown-windows-msvc", | |
| "compiler_target": "x86_64-unknown-windows-msvc", | |
| "os": "Windows", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }}\" -D CMAKE_STATIC_LIBRARY_PREFIX_Swift=lib", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64" | |
| }, | |
| { | |
| "arch": "arm64", | |
| "cpu": "aarch64", | |
| "triple": "aarch64-unknown-windows-msvc", | |
| "compiler_target": "aarch64-unknown-windows-msvc", | |
| "os": "Windows", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }}\" -D CMAKE_STATIC_LIBRARY_PREFIX_Swift=lib", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64" | |
| } | |
| ] | |
| } | |
| WINDOWS_ARM64_HOST_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "arm64", | |
| "cpu": "aarch64", | |
| "triple": "aarch64-unknown-windows-msvc", | |
| "compiler_target": "aarch64-unknown-windows-msvc", | |
| "os": "Windows", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }}\" -D CMAKE_STATIC_LIBRARY_PREFIX_Swift=lib", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64" | |
| } | |
| ] | |
| } | |
| WINDOWS_X64_BUILD_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "amd64", | |
| "cpu": "x86_64", | |
| "compiler_target": "x86_64-unknown-windows-msvc", | |
| "os": "Windows", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64" | |
| } | |
| ] | |
| } | |
| WINDOWS_ARM64_BUILD_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "arm64", | |
| "cpu": "aarch64", | |
| "compiler_target": "aarch64-unknown-windows-msvc", | |
| "os": "Windows", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64" | |
| } | |
| ] | |
| } | |
| WINDOWS_X64_TARGET_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "amd64", | |
| "cpu": "x86_64", | |
| "os": "Windows", | |
| "platform": "Windows", | |
| "triple": "x86_64-unknown-windows-msvc", | |
| "triple_no_api_level": "x86_64-unknown-windows-msvc", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "-D MSVC_C_ARCHITECTURE_ID=amd64 -D MSVC_CXX_ARCHITECTURE_ID=amd64 -D CMAKE_STATIC_LIBRARY_PREFIX_Swift=lib" | |
| }, | |
| { | |
| "arch": "arm64", | |
| "cpu": "aarch64", | |
| "os": "Windows", | |
| "platform": "Windows", | |
| "triple": "aarch64-unknown-windows-msvc", | |
| "triple_no_api_level": "aarch64-unknown-windows-msvc", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "-D MSVC_C_ARCHITECTURE_ID=arm64 -D MSVC_CXX_ARCHITECTURE_ID=arm64 -D CMAKE_STATIC_LIBRARY_PREFIX_Swift=lib" | |
| }, | |
| { | |
| "arch": "x86", | |
| "cpu": "i686", | |
| "os": "Windows", | |
| "platform": "Windows", | |
| "triple": "i686-unknown-windows-msvc", | |
| "triple_no_api_level": "i686-unknown-windows-msvc", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=X86", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "-D MSVC_C_ARCHITECTURE_ID=x86 -D MSVC_CXX_ARCHITECTURE_ID=x86" | |
| }, | |
| { | |
| "arch": "arm64", | |
| "cpu": "aarch64", | |
| "os": "Android", | |
| "platform": "Android", | |
| "triple": "aarch64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}", | |
| "triple_no_api_level": "aarch64-unknown-linux-android", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.ANDROID_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.ANDROID_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "-sdk ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -target aarch64-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }} -Xclang-linker --sysroot -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -resource-dir -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/lib/clang/17 -L ${env:GITHUB_WORKSPACE}/BinaryCache/swift/lib/swift/android -g", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "-D CMAKE_ANDROID_NDK=\"${NDKPATH}\" -D SWIFT_ANDROID_NDK_PATH=\"${NDKPATH}\"", | |
| "extra_flags": "-D CMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=arm64-v8a", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr", | |
| "llvm_cmake_flags": "-D LLVM_HOST_TRIPLE=aarch64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}", | |
| "stdlib_cmake_flags": "-D SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT=YES -D LLVM_ENABLE_LIBCXX=YES -D SWIFT_USE_LINKER=lld -D CMAKE_SYSTEM_PROCESSOR=aarch64" | |
| }, | |
| { | |
| "arch": "armv7", | |
| "cpu": "armv7", | |
| "os": "Android", | |
| "platform": "Android", | |
| "triple": "armv7-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }}", | |
| "triple_no_api_level": "armv7-unknown-linux-androideabi", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.ANDROID_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.ANDROID_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "-sdk ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -target armv7a-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }} -Xclang-linker --sysroot -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -resource-dir -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/lib/clang/17 -L ${env:GITHUB_WORKSPACE}/BinaryCache/swift/lib/swift/android -g", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "-D CMAKE_ANDROID_NDK=\"${NDKPATH}\" -D SWIFT_ANDROID_NDK_PATH=\"${NDKPATH}\"", | |
| "extra_flags": "-D CMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=armeabi-v7a", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr", | |
| "llvm_cmake_flags": "-D LLVM_HOST_TRIPLE=armv7a-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }}", | |
| "stdlib_cmake_flags": "-D SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT=YES -D LLVM_ENABLE_LIBCXX=YES -D SWIFT_USE_LINKER=lld -D CMAKE_SYSTEM_PROCESSOR=armv7-a" | |
| }, | |
| { | |
| "arch": "i686", | |
| "cpu": "i686", | |
| "os": "Android", | |
| "platform": "Android", | |
| "triple": "i686-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}", | |
| "triple_no_api_level": "i686-unknown-linux-android", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.ANDROID_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.ANDROID_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "-sdk ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -target i686-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }} -Xclang-linker --sysroot -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -resource-dir -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/lib/clang/17 -L ${env:GITHUB_WORKSPACE}/BinaryCache/swift/lib/swift/android -g", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "-D CMAKE_ANDROID_NDK=\"${NDKPATH}\" -D SWIFT_ANDROID_NDK_PATH=\"${NDKPATH}\"", | |
| "extra_flags": "-D CMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=x86", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr", | |
| "llvm_cmake_flags": "-D LLVM_HOST_TRIPLE=i686-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}", | |
| "stdlib_cmake_flags": "-D SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT=YES -D LLVM_ENABLE_LIBCXX=YES -D SWIFT_USE_LINKER=lld -D CMAKE_SYSTEM_PROCESSOR=i686" | |
| }, | |
| { | |
| "arch": "x86_64", | |
| "cpu": "x86_64", | |
| "os": "Android", | |
| "platform": "Android", | |
| "triple": "x86_64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}", | |
| "triple_no_api_level": "x86_64-unknown-linux-android", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.ANDROID_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.ANDROID_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "-sdk ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -target x86_64-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }} -Xclang-linker --sysroot -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Xclang-linker -resource-dir -Xclang-linker ${NDKPATH}/toolchains/llvm/prebuilt/windows-x86_64/lib/clang/17 -L ${env:GITHUB_WORKSPACE}/BinaryCache/swift/lib/swift/android -g", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "-D CMAKE_ANDROID_NDK=\"${NDKPATH}\" -D SWIFT_ANDROID_NDK_PATH=\"${NDKPATH}\"", | |
| "extra_flags": "-D CMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=x86_64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr", | |
| "llvm_cmake_flags": "-D LLVM_HOST_TRIPLE=x86_64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}", | |
| "stdlib_cmake_flags": "-D SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT=YES -D LLVM_ENABLE_LIBCXX=YES -D SWIFT_USE_LINKER=lld -D CMAKE_SYSTEM_PROCESSOR=x86_64" | |
| } | |
| ] | |
| } | |
| WINDOWS_ARM64_TARGET_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "amd64", | |
| "cpu": "x86_64", | |
| "os": "Windows", | |
| "platform": "Windows", | |
| "triple": "x86_64-unknown-windows-msvc", | |
| "triple_no_api_level": "x86_64-unknown-windows-msvc", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "-D MSVC_C_ARCHITECTURE_ID=amd64 -D MSVC_CXX_ARCHITECTURE_ID=amd64" | |
| }, | |
| { | |
| "arch": "arm64", | |
| "cpu": "aarch64", | |
| "os": "Windows", | |
| "platform": "Windows", | |
| "triple": "aarch64-unknown-windows-msvc", | |
| "triple_no_api_level": "aarch64-unknown-windows-msvc", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "-D MSVC_C_ARCHITECTURE_ID=arm64 -D MSVC_CXX_ARCHITECTURE_ID=arm64" | |
| }, | |
| { | |
| "arch": "x86", | |
| "cpu": "i686", | |
| "os": "Windows", | |
| "platform": "Windows", | |
| "triple": "i686-unknown-windows-msvc", | |
| "triple_no_api_level": "i686-unknown-windows-msvc", | |
| "cc": "cl", | |
| "cflags": "${{ steps.context.outputs.WINDOWS_CMAKE_C_FLAGS }}", | |
| "cxx": "cl", | |
| "cxxflags": "${{ steps.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=X86", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "-D MSVC_C_ARCHITECTURE_ID=x86 -D MSVC_CXX_ARCHITECTURE_ID=x86" | |
| } | |
| ] | |
| } | |
| DARWIN_HOST_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "x86_64", | |
| "cpu": "x86_64", | |
| "os": "Darwin", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.DARWIN_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.DARWIN_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=15.0 -D CMAKE_OSX_ARCHITECTURES=x86_64" | |
| }, | |
| { | |
| "arch": "arm64", | |
| "cpu": "arm64", | |
| "os": "Darwin", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=${{ steps.context.outputs.DARWIN_CMAKE_EXE_LINKER_FLAGS }} -D CMAKE_SHARED_LINKER_FLAGS=${{ steps.context.outputs.DARWIN_CMAKE_SHARED_LINKER_FLAGS }}", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=arm64 -D CMAKE_OSX_DEPLOYMENT_TARGET=15.0 -D CMAKE_OSX_ARCHITECTURES=arm64" | |
| } | |
| ] | |
| } | |
| DARWIN_BUILD_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "arm64", | |
| "cpu": "arm64", | |
| "compiler_target": "arm64-apple-macosx15.0", | |
| "os": "Darwin", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=arm64 -D CMAKE_OSX_DEPLOYMENT_TARGET=15.0 -D CMAKE_OSX_ARCHITECTURES=arm64" | |
| } | |
| ] | |
| } | |
| DARWIN_TARGET_MATRIX: >- | |
| { | |
| "include": [ | |
| { | |
| "arch": "x86_64", | |
| "cpu": "x86_64", | |
| "os": "Darwin", | |
| "platform": "MacOSX", | |
| "triple": "x86_64-apple-macosx15.0", | |
| "triple_no_api_level": "x86_64-apple-macosx15.0", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.DARWIN_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.DARWIN_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.DARWIN_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=15.0 -D CMAKE_OSX_ARCHITECTURES=x86_64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Toolchains/${{ steps.context.outputs.swift_version }}+Asserts/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "" | |
| }, | |
| { | |
| "arch": "arm64", | |
| "cpu": "arm64", | |
| "os": "Darwin", | |
| "platform": "MacOSX", | |
| "triple": "arm64-apple-macosx15.0", | |
| "triple_no_api_level": "arm64-apple-macosx15.0", | |
| "cc": "clang", | |
| "cflags": "${{ steps.context.outputs.DARWIN_CMAKE_C_FLAGS }}", | |
| "cxx": "clang++", | |
| "cxxflags": "${{ steps.context.outputs.DARWIN_CMAKE_CXX_FLAGS }}", | |
| "swiftflags": "${{ steps.context.outputs.DARWIN_CMAKE_Swift_FLAGS }}", | |
| "cmake_linker_flags": "-D CMAKE_EXE_LINKER_FLAGS=\"${{ steps.context.outputs.DARWIN_CMAKE_EXE_LINKER_FLAGS }}\" -D CMAKE_SHARED_LINKER_FLAGS=\"${{ steps.context.outputs.DARWIN_CMAKE_SHARED_LINKER_FLAGS }}\"", | |
| "cmake_ndk_flags": "", | |
| "extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=arm64 -D CMAKE_OSX_DEPLOYMENT_TARGET=15.0 -D CMAKE_OSX_ARCHITECTURES=arm64", | |
| "sdk_install_dir": "${env:GITHUB_WORKSPACE}/BuildRoot/Library/Developer/Toolchains/${{ steps.context.outputs.swift_version }}+Asserts/usr", | |
| "llvm_cmake_flags": "", | |
| "stdlib_cmake_flags": "" | |
| } | |
| ] | |
| } | |
| run: | | |
| create_compilers_matrix() { | |
| local host_matrix=$1 | |
| jq -n --argjson host_matrix "${host_matrix}" ' | |
| { | |
| "include": [ | |
| ($host_matrix.include[] | . + {"variant": "Asserts"}), | |
| ($host_matrix.include[] | . + {"variant": "NoAsserts"}) | |
| ] | |
| } | |
| ' | |
| } | |
| WINDOWS_X64_COMPILERS_MATRIX=$(create_compilers_matrix "${WINDOWS_X64_HOST_MATRIX}") | |
| WINDOWS_ARM64_COMPILERS_MATRIX=$(create_compilers_matrix "${WINDOWS_ARM64_HOST_MATRIX}") | |
| DARWIN_COMPILERS_MATRIX=$(create_compilers_matrix "${DARWIN_HOST_MATRIX}") | |
| echo "windows_x64_host_matrix=$(jq -r -c '.' <<< ${WINDOWS_X64_HOST_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_arm64_host_matrix=$(jq -r -c '.' <<< ${WINDOWS_ARM64_HOST_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_x64_compilers_matrix=$(jq -r -c '.' <<< ${WINDOWS_X64_COMPILERS_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_arm64_compilers_matrix=$(jq -r -c '.' <<< ${WINDOWS_ARM64_COMPILERS_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_x64_build_matrix=$(jq -r -c '.' <<< ${WINDOWS_X64_BUILD_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_arm64_build_matrix=$(jq -r -c '.' <<< ${WINDOWS_ARM64_BUILD_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_x64_target_matrix=$(jq -r -c '.' <<< ${WINDOWS_X64_TARGET_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "windows_arm64_target_matrix=$(jq -r -c '.' <<< ${WINDOWS_ARM64_TARGET_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "darwin_host_matrix=$(jq -r -c '.' <<< ${DARWIN_HOST_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "darwin_build_matrix=$(jq -r -c '.' <<< ${DARWIN_BUILD_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "darwin_compilers_matrix=$(jq -r -c '.' <<< ${DARWIN_COMPILERS_MATRIX})" >> ${GITHUB_OUTPUT} | |
| echo "darwin_target_matrix=$(jq -r -c '.' <<< ${DARWIN_TARGET_MATRIX})" >> ${GITHUB_OUTPUT} | |
| windows-build: | |
| needs: [context] | |
| name: Windows Swift Toolchains Build | |
| permissions: | |
| contents: read | |
| id-token: write | |
| uses: ./.github/workflows/swift-toolchain.yml | |
| with: | |
| build_os: Windows | |
| build_arch: ${{ needs.context.outputs.windows_build_arch }} | |
| build_matrix: ${{ needs.context.outputs[format('windows_{0}_build_matrix', needs.context.outputs.windows_build_cpu)] }} | |
| host_matrix: ${{ needs.context.outputs[format('windows_{0}_host_matrix', needs.context.outputs.windows_build_cpu)] }} | |
| target_matrix: ${{ needs.context.outputs[format('windows_{0}_target_matrix', needs.context.outputs.windows_build_cpu)] }} | |
| compilers_matrix: ${{ needs.context.outputs[format('windows_{0}_compilers_matrix', needs.context.outputs.windows_build_cpu)] }} | |
| curl_revision: ${{ needs.context.outputs.curl_revision }} | |
| curl_version: ${{ needs.context.outputs.curl_version }} | |
| ds2_revision: ${{ needs.context.outputs.ds2_revision }} | |
| indexstore_db_revision: ${{ needs.context.outputs.indexstore_db_revision }} | |
| libxml2_revision: ${{ needs.context.outputs.libxml2_revision }} | |
| libxml2_version: ${{ needs.context.outputs.libxml2_version }} | |
| llvm_project_revision: ${{ needs.context.outputs.llvm_project_revision }} | |
| mimalloc_revision: ${{ needs.context.outputs.mimalloc_revision }} | |
| sourcekit_lsp_revision: ${{ needs.context.outputs.sourcekit_lsp_revision }} | |
| swift_argument_parser_revision: ${{ needs.context.outputs.swift_argument_parser_revision }} | |
| swift_asn1_revision: ${{ needs.context.outputs.swift_asn1_revision }} | |
| swift_atomics_revision: ${{ needs.context.outputs.swift_atomics_revision }} | |
| swift_build_revision: ${{ needs.context.outputs.swift_build_revision }} | |
| swift_certificates_revision: ${{ needs.context.outputs.swift_certificates_revision }} | |
| swift_cmark_revision: ${{ needs.context.outputs.swift_cmark_revision }} | |
| swift_cmark_version: ${{ needs.context.outputs.swift_cmark_version }} | |
| swift_collections_revision: ${{ needs.context.outputs.swift_collections_revision }} | |
| swift_corelibs_foundation_revision: ${{ needs.context.outputs.swift_corelibs_foundation_revision }} | |
| swift_corelibs_libdispatch_revision: ${{ needs.context.outputs.swift_corelibs_libdispatch_revision }} | |
| swift_corelibs_xctest_revision: ${{ needs.context.outputs.swift_corelibs_xctest_revision }} | |
| swift_crypto_revision: ${{ needs.context.outputs.swift_crypto_revision }} | |
| swift_driver_revision: ${{ needs.context.outputs.swift_driver_revision }} | |
| swift_experimental_string_processing_revision: ${{ needs.context.outputs.swift_experimental_string_processing_revision }} | |
| swift_format_revision: ${{ needs.context.outputs.swift_format_revision }} | |
| swift_foundation_revision: ${{ needs.context.outputs.swift_foundation_revision }} | |
| swift_foundation_icu_revision: ${{ needs.context.outputs.swift_foundation_icu_revision }} | |
| swift_installer_scripts_revision: ${{ needs.context.outputs.swift_installer_scripts_revision }} | |
| swift_llbuild_revision: ${{ needs.context.outputs.swift_llbuild_revision }} | |
| swift_lmdb_revision: ${{ needs.context.outputs.swift_lmdb_revision }} | |
| swift_markdown_revision: ${{ needs.context.outputs.swift_markdown_revision }} | |
| swift_package_manager_revision: ${{ needs.context.outputs.swift_package_manager_revision }} | |
| swift_revision: ${{ needs.context.outputs.swift_revision }} | |
| swift_syntax_revision: ${{ needs.context.outputs.swift_syntax_revision }} | |
| swift_system_revision: ${{ needs.context.outputs.swift_system_revision }} | |
| swift_testing_revision: ${{ needs.context.outputs.swift_testing_revision }} | |
| swift_toolchain_sqlite_revision: ${{ needs.context.outputs.swift_toolchain_sqlite_revision }} | |
| swift_toolchain_sqlite_version: ${{ needs.context.outputs.swift_toolchain_sqlite_version }} | |
| swift_tools_support_core_revision: ${{ needs.context.outputs.swift_tools_support_core_revision }} | |
| zlib_revision: ${{ needs.context.outputs.zlib_revision }} | |
| zlib_version: ${{ needs.context.outputs.zlib_version }} | |
| ANDROID_API_LEVEL: ${{ needs.context.outputs.ANDROID_API_LEVEL }} | |
| WINDOWS_CMAKE_C_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_C_FLAGS }} | |
| WINDOWS_CMAKE_CXX_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }} | |
| WINDOWS_CMAKE_EXE_LINKER_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }} | |
| WINDOWS_CMAKE_SHARED_LINKER_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }} | |
| ANDROID_CLANG_VERSION: ${{ needs.context.outputs.ANDROID_CLANG_VERSION }} | |
| ANDROID_CMAKE_C_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_C_FLAGS }} | |
| ANDROID_CMAKE_CXX_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_CXX_FLAGS }} | |
| ANDROID_CMAKE_EXE_LINKER_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }} | |
| ANDROID_CMAKE_SHARED_LINKER_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }} | |
| ANDROID_NDK_VERSION: ${{ needs.context.outputs.ANDROID_NDK_VERSION }} | |
| CMAKE_Swift_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_Swift_FLAGS }} | |
| debug_info: ${{ fromJSON(needs.context.outputs.debug_info) }} | |
| signed: ${{ fromJSON(needs.context.outputs.signed) }} | |
| swift_version: ${{ needs.context.outputs.swift_version }} | |
| swift_tag: ${{ needs.context.outputs.swift_tag }} | |
| default_build_runner: ${{ needs.context.outputs[format('windows_{0}_build_runner', needs.context.outputs.windows_build_cpu)] }} | |
| compilers_build_runner: ${{ needs.context.outputs[format('windows_{0}_compilers_runner', needs.context.outputs.windows_build_cpu)] }} | |
| build_android: ${{ inputs.build_android }} | |
| secrets: | |
| SYMBOL_SERVER_PAT: ${{ secrets.SYMBOL_SERVER_PAT }} | |
| CERTIFICATE: ${{ secrets.CERTIFICATE }} | |
| PASSPHRASE: ${{ secrets.PASSPHRASE }} | |
| mac-build: | |
| # TODO: Enable the mac build. | |
| if: false | |
| needs: [context] | |
| name: macOS Swift Toolchains Build | |
| permissions: | |
| contents: read | |
| id-token: write | |
| uses: ./.github/workflows/swift-toolchain.yml | |
| with: | |
| build_os: Darwin | |
| build_arch: arm64 | |
| build_matrix: ${{ needs.context.outputs.darwin_build_matrix }} | |
| host_matrix: ${{ needs.context.outputs.darwin_host_matrix }} | |
| compilers_matrix: ${{ needs.context.outputs.darwin_compilers_matrix }} | |
| target_matrix: ${{ needs.context.outputs.darwin_target_matrix }} | |
| curl_revision: ${{ needs.context.outputs.curl_revision }} | |
| curl_version: ${{ needs.context.outputs.curl_version }} | |
| ds2_revision: ${{ needs.context.outputs.ds2_revision }} | |
| indexstore_db_revision: ${{ needs.context.outputs.indexstore_db_revision }} | |
| libxml2_revision: ${{ needs.context.outputs.libxml2_revision }} | |
| libxml2_version: ${{ needs.context.outputs.libxml2_version }} | |
| llvm_project_revision: ${{ needs.context.outputs.llvm_project_revision }} | |
| mimalloc_revision: ${{ needs.context.outputs.mimalloc_revision }} | |
| sourcekit_lsp_revision: ${{ needs.context.outputs.sourcekit_lsp_revision }} | |
| swift_argument_parser_revision: ${{ needs.context.outputs.swift_argument_parser_revision }} | |
| swift_asn1_revision: ${{ needs.context.outputs.swift_asn1_revision }} | |
| swift_atomics_revision: ${{ needs.context.outputs.swift_atomics_revision }} | |
| swift_build_revision: ${{ needs.context.outputs.swift_build_revision }} | |
| swift_certificates_revision: ${{ needs.context.outputs.swift_certificates_revision }} | |
| swift_cmark_revision: ${{ needs.context.outputs.swift_cmark_revision }} | |
| swift_cmark_version: ${{ needs.context.outputs.swift_cmark_version }} | |
| swift_collections_revision: ${{ needs.context.outputs.swift_collections_revision }} | |
| swift_corelibs_foundation_revision: ${{ needs.context.outputs.swift_corelibs_foundation_revision }} | |
| swift_corelibs_libdispatch_revision: ${{ needs.context.outputs.swift_corelibs_libdispatch_revision }} | |
| swift_corelibs_xctest_revision: ${{ needs.context.outputs.swift_corelibs_xctest_revision }} | |
| swift_crypto_revision: ${{ needs.context.outputs.swift_crypto_revision }} | |
| swift_driver_revision: ${{ needs.context.outputs.swift_driver_revision }} | |
| swift_experimental_string_processing_revision: ${{ needs.context.outputs.swift_experimental_string_processing_revision }} | |
| swift_format_revision: ${{ needs.context.outputs.swift_format_revision }} | |
| swift_foundation_revision: ${{ needs.context.outputs.swift_foundation_revision }} | |
| swift_foundation_icu_revision: ${{ needs.context.outputs.swift_foundation_icu_revision }} | |
| swift_installer_scripts_revision: ${{ needs.context.outputs.swift_installer_scripts_revision }} | |
| swift_llbuild_revision: ${{ needs.context.outputs.swift_llbuild_revision }} | |
| swift_lmdb_revision: ${{ needs.context.outputs.swift_lmdb_revision }} | |
| swift_markdown_revision: ${{ needs.context.outputs.swift_markdown_revision }} | |
| swift_package_manager_revision: ${{ needs.context.outputs.swift_package_manager_revision }} | |
| swift_revision: ${{ needs.context.outputs.swift_revision }} | |
| swift_syntax_revision: ${{ needs.context.outputs.swift_syntax_revision }} | |
| swift_system_revision: ${{ needs.context.outputs.swift_system_revision }} | |
| swift_testing_revision: ${{ needs.context.outputs.swift_testing_revision }} | |
| swift_toolchain_sqlite_revision: ${{ needs.context.outputs.swift_toolchain_sqlite_revision }} | |
| swift_toolchain_sqlite_version: ${{ needs.context.outputs.swift_toolchain_sqlite_version }} | |
| swift_tools_support_core_revision: ${{ needs.context.outputs.swift_tools_support_core_revision }} | |
| zlib_revision: ${{ needs.context.outputs.zlib_revision }} | |
| zlib_version: ${{ needs.context.outputs.zlib_version }} | |
| ANDROID_API_LEVEL: ${{ needs.context.outputs.ANDROID_API_LEVEL }} | |
| WINDOWS_CMAKE_C_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_C_FLAGS }} | |
| WINDOWS_CMAKE_CXX_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }} | |
| WINDOWS_CMAKE_EXE_LINKER_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_EXE_LINKER_FLAGS }} | |
| WINDOWS_CMAKE_SHARED_LINKER_FLAGS: ${{ needs.context.outputs.WINDOWS_CMAKE_SHARED_LINKER_FLAGS }} | |
| ANDROID_CLANG_VERSION: ${{ needs.context.outputs.ANDROID_CLANG_VERSION }} | |
| ANDROID_CMAKE_C_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_C_FLAGS }} | |
| ANDROID_CMAKE_CXX_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_CXX_FLAGS }} | |
| ANDROID_CMAKE_EXE_LINKER_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_EXE_LINKER_FLAGS }} | |
| ANDROID_CMAKE_SHARED_LINKER_FLAGS: ${{ needs.context.outputs.ANDROID_CMAKE_SHARED_LINKER_FLAGS }} | |
| ANDROID_NDK_VERSION: ${{ needs.context.outputs.ANDROID_NDK_VERSION }} | |
| CMAKE_Swift_FLAGS: ${{ needs.context.outputs.DARWIN_CMAKE_Swift_FLAGS }} | |
| debug_info: ${{ fromJSON(needs.context.outputs.debug_info) }} | |
| signed: ${{ fromJSON(needs.context.outputs.signed) }} | |
| swift_version: ${{ needs.context.outputs.swift_version }} | |
| swift_tag: ${{ needs.context.outputs.swift_tag }} | |
| default_build_runner: ${{ needs.context.outputs.mac_build_runner }} | |
| compilers_build_runner: ${{ needs.context.outputs.mac_build_runner }} | |
| secrets: | |
| SYMBOL_SERVER_PAT: ${{ secrets.SYMBOL_SERVER_PAT }} | |
| CERTIFICATE: ${{ secrets.CERTIFICATE }} | |
| PASSPHRASE: ${{ secrets.PASSPHRASE }} | |
| snapshot: | |
| runs-on: ubuntu-latest | |
| needs: [context, windows-build] | |
| if: inputs.create_snapshot == true && github.event_name == 'schedule' | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| ref: refs/heads/main | |
| show-progress: false | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: stable.xml | |
| - run: | | |
| git config --global user.name 'github-action[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| if ! git diff --exit-code ; then | |
| git add stable.xml | |
| git commit -m "repo: update stable revision snapshot ${{ needs.context.outputs.swift_tag }}" | |
| git push origin HEAD:main | |
| fi | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [context, windows-build] | |
| if: inputs.create_release == true | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: Windows-amd64-installer | |
| path: ${{ github.workspace }}/tmp/amd64 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: Windows-arm64-installer | |
| path: ${{ github.workspace }}/tmp/arm64 | |
| - name: Create Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| branch_version_string=${{ inputs.swift_version || '0.0.0' }} | |
| if [[ $branch_version_string == "0.0.0" ]]; then | |
| latest="true" | |
| else | |
| latest="false" | |
| fi | |
| # Create Release | |
| gh release create ${{ needs.context.outputs.swift_tag }} -R ${{ github.repository }} --latest=${latest} | |
| # AMD64 | |
| cd ${{ github.workspace }}/tmp/amd64 | |
| mv installer.exe installer-amd64.exe | |
| gh release upload ${{ needs.context.outputs.swift_tag }} installer-amd64.exe -R ${{ github.repository }} | |
| shasum -a 256 installer-amd64.exe > installer-amd64.exe.sha256 | |
| gh release upload ${{ needs.context.outputs.swift_tag }} installer-amd64.exe.sha256 -R ${{ github.repository }} | |
| # ARM64 | |
| cd ${{ github.workspace }}/tmp/arm64 | |
| mv installer.exe installer-arm64.exe | |
| gh release upload ${{ needs.context.outputs.swift_tag }} installer-arm64.exe -R ${{ github.repository }} | |
| shasum -a 256 installer-arm64.exe > installer-arm64.exe.sha256 | |
| gh release upload ${{ needs.context.outputs.swift_tag }} installer-arm64.exe.sha256 -R ${{ github.repository }} |