Skip to content

Development Snapshot #196

Development Snapshot

Development Snapshot #196

name: Development Snapshot
on:
workflow_dispatch:
inputs:
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
workflow_call:
inputs:
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
windows_default_runner:
description: 'Build runner'
required: false
type: string
windows_compilers_runner:
description: 'Build runner for `compilers` job'
type: string
required: false
secrets:
SYMBOL_SERVER_PAT:
required: true
CERTIFICATE:
required: true
PASSPHRASE:
required: true
env:
SCCACHE_DIRECT: yes
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_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_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 }}
yams_revision: ${{ steps.context.outputs.yams_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_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_build_runner: ${{ steps.context.outputs.windows_build_runner }}
windows_compilers_runner: ${{ steps.context.outputs.windows_compilers_runner }}
mac_build_runner: ${{ steps.context.outputs.mac_build_runner }}
windows_host_matrix: ${{ steps.setup-matrix.outputs.windows_host_matrix }}
windows_build_matrix: ${{ steps.setup-matrix.outputs.windows_build_matrix }}
windows_target_matrix: ${{ steps.setup-matrix.outputs.windows_target_matrix }}
darwin_host_matrix: ${{ steps.setup-matrix.outputs.darwin_host_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 https://github.com/compnerd/swift-build -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/v2.1.7
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/0.7.0
swift_atomics_revision=refs/tags/1.2.0
swift_certificates_revision=refs/tags/0.1.0
swift_cmark_revision=refs/tags/${{ inputs.swift_tag }}
swift_collections_revision=refs/tags/1.1.2
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/tags/0.0.8
swift_installer_scripts_revision=refs/heads/main
swift_llbuild_revision=refs/tags/${{ inputs.swift_tag }}
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/main
swift_tools_support_core_revision=refs/tags/${{ inputs.swift_tag }}
curl_revision=refs/tags/curl-8_5_0
ds2_revision=refs/tags/nightly-2024-09-19
libxml2_revision=refs/tags/v2.11.5
yams_revision=refs/tags/5.0.6
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" >> ${GITHUB_OUTPUT}
echo ANDROID_CMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections -g" >> ${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_build_runner=${{ inputs.windows_default_runner || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
echo windows_compilers_runner=${{ inputs.windows_compilers_runner || inputs.windows_default_runner || vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
# 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=r26b >> ${GITHUB_OUTPUT}
- uses: actions/upload-artifact@v4
with:
name: stable.xml
path: stable.xml
if-no-files-found: ignore
- name: Setup matrix
id: setup-matrix
env:
WINDOWS_HOST_MATRIX: >-
{
"include": [
{
"arch": "amd64",
"os": "Windows",
"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_SHARED_LINKER_FLAGS }}\"",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64 -D CMAKE_MT=mt"
},
{
"arch": "arm64",
"os": "Windows",
"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_SHARED_LINKER_FLAGS }}\"",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64 -D CMAKE_MT=mt"
}
]
}
WINDOWS_BUILD_MATRIX: >-
{
"include": [
{
"arch": "amd64",
"os": "Windows",
"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 }}",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64 -D CMAKE_MT=mt"
}
]
}
WINDOWS_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 }}\"",
"llvm_flags": "",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=AMD64 -D CMAKE_MT=mt"
},
{
"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 }}\"",
"llvm_flags": "",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=ARM64 -D CMAKE_MT=mt"
},
{
"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": "",
"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 }}\"",
"llvm_flags": "",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=X86 -D CMAKE_MT=mt"
},
{
"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 -Xclang-linker aarch64-unknown-linux-android${{ 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 ${{ 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 }}\"",
"llvm_flags": "-DCMAKE_SYSTEM_PROCESSOR=aarch64 -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}",
"extra_flags": "-DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a"
},
{
"arch": "armv7",
"cpu": "armv7-a",
"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 -Xclang-linker 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 ${{ 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 }}\"",
"llvm_flags": "-DCMAKE_SYSTEM_PROCESSOR=armv7-a -DLLVM_HOST_TRIPLE=armv7a-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }}",
"extra_flags": "-DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a"
},
{
"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 -Xclang-linker i686-unknown-linux-android${{ 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 ${{ 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 }}\"",
"llvm_flags": "-DCMAKE_SYSTEM_PROCESSOR=i686 -DLLVM_HOST_TRIPLE=i686-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}",
"extra_flags": "-DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=x86"
},
{
"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 -Xclang-linker x86_64-unknown-linux-android${{ 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 ${{ 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 }}\"",
"llvm_flags": "-DCMAKE_SYSTEM_PROCESSOR=x86_64 -DLLVM_HOST_TRIPLE=x86_64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}",
"extra_flags": "-DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=x86_64"
}
]
}
DARWIN_HOST_MATRIX: >-
{
"include": [
{
"arch": "x86_64",
"os": "Darwin",
"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 }}\"",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=10.15 -D CMAKE_OSX_ARCHITECTURES=x86_64"
},
{
"arch": "arm64",
"os": "Darwin",
"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 }}",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=arm64 -D CMAKE_OSX_DEPLOYMENT_TARGET=10.15 -D CMAKE_OSX_ARCHITECTURES=arm64"
}
]
}
DARWIN_BUILD_MATRIX: >-
{
"include": [
{
"arch": "arm64",
"os": "Darwin",
"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 }}",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=arm64 -D CMAKE_OSX_DEPLOYMENT_TARGET=10.15 -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 }}\"",
"llvm_flags": "",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=10.15 -D CMAKE_OSX_ARCHITECTURES=x86_64"
},
{
"arch": "arm64",
"cpu": "aarch64",
"os": "Darwin",
"platform": "MacOSX",
"triple": "aarch64-apple-macosx15.0",
"triple_no_api_level": "aarch64-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 }}\"",
"llvm_flags": "",
"extra_flags": "-D CMAKE_SYSTEM_PROCESSOR=arm64 -D CMAKE_OSX_DEPLOYMENT_TARGET=10.15 -D CMAKE_OSX_ARCHITECTURES=arm64"
}
]
}
run: |
echo "windows_host_matrix=$(jq -r -c '.' <<< ${WINDOWS_HOST_MATRIX})" >> ${GITHUB_OUTPUT}
echo "windows_build_matrix=$(jq -r -c '.' <<< ${WINDOWS_BUILD_MATRIX})" >> ${GITHUB_OUTPUT}
echo "windows_target_matrix=$(jq -r -c '.' <<< ${WINDOWS_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_target_matrix=$(jq -r -c '.' <<< ${DARWIN_TARGET_MATRIX})" >> ${GITHUB_OUTPUT}
windows-build:
needs: [context]
name: Windows Swift Toolchains Build
uses: ./.github/workflows/swift-toolchain.yml
with:
build_os: Windows
build_arch: amd64
build_matrix: ${{ needs.context.outputs.windows_build_matrix }}
host_matrix: ${{ needs.context.outputs.windows_host_matrix }}
target_matrix: ${{ needs.context.outputs.windows_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_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_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 }}
yams_revision: ${{ needs.context.outputs.yams_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_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.windows_build_runner }}
compilers_build_runner: ${{ needs.context.outputs.windows_compilers_runner }}
secrets:
SYMBOL_SERVER_PAT: ${{ secrets.SYMBOL_SERVER_PAT }}
CERTIFICATE: ${{ secrets.CERTIFICATE }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
mac-build:
needs: [context]
name: macOS Swift Toolchains Build
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 }}
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_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_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 }}
yams_revision: ${{ needs.context.outputs.yams_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_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: github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
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: installer-amd64
path: ${{ github.workspace }}/tmp/amd64
- uses: actions/download-artifact@v4
with:
name: installer-arm64
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 }}