Skip to content

GHA: wire up build of swift-docc #234

GHA: wire up build of swift-docc

GHA: wire up build of swift-docc #234

Workflow file for this run

name: Swift Toolchain Build

Check failure on line 1 in .github/workflows/swift-toolchain.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/swift-toolchain.yml

Invalid workflow file

(Line: 3943, Col: 24): Unrecognized named-value: 'input'. Located at position 1 within expression: input.swift_version, (Line: 3967, Col: 24): Unrecognized named-value: 'input'. Located at position 1 within expression: input.swift_version
on:
workflow_call:
inputs:
build_os:
required: true
type: string
build_arch:
required: true
type: string
build_matrix:
required: true
type: string
host_matrix:
required: true
type: string
compilers_matrix:
required: true
type: string
target_matrix:
required: true
type: string
curl_revision:
required: true
type: string
curl_version:
required: true
type: string
ds2_revision:
required: true
type: string
indexstore_db_revision:
required: true
type: string
libxml2_revision:
required: true
type: string
libxml2_version:
required: true
type: string
llvm_project_revision:
required: true
type: string
mimalloc_revision:
required: true
type: string
sourcekit_lsp_revision:
required: true
type: string
swift_argument_parser_revision:
required: true
type: string
swift_asn1_revision:
required: true
type: string
swift_atomics_revision:
required: true
type: string
swift_build_revision:
required: true
type: string
swift_certificates_revision:
required: true
type: string
swift_cmark_revision:
required: true
type: string
swift_cmark_version:
required: true
type: string
swift_collections_revision:
required: true
type: string
swift_corelibs_foundation_revision:
required: true
type: string
swift_corelibs_libdispatch_revision:
required: true
type: string
swift_corelibs_xctest_revision:
required: true
type: string
swift_crypto_revision:
required: true
type: string
swift_docc_render_artifact_revision:
required: true
type: string
swift_docc_revision:
required: true
type: string
swift_docc_symbolkit_revision:
required: true
type: string
swift_driver_revision:
required: true
type: string
swift_experimental_string_processing_revision:
required: true
type: string
swift_format_revision:
required: true
type: string
swift_foundation_revision:
required: true
type: string
swift_foundation_icu_revision:
required: true
type: string
swift_installer_scripts_revision:
required: true
type: string
swift_llbuild_revision:
required: true
type: string
swift_lmdb_revision:
required: true
type: string
swift_markdown_revision:
required: true
type: string
swift_package_manager_revision:
required: true
type: string
swift_revision:
required: true
type: string
swift_subprocess_revision:
required: true
type: string
swift_syntax_revision:
required: true
type: string
swift_system_revision:
required: true
type: string
swift_testing_revision:
required: true
type: string
swift_toolchain_sqlite_revision:
required: true
type: string
swift_toolchain_sqlite_version:
required: true
type: string
swift_tools_protocols_revision:
required: true
type: string
swift_tools_support_core_revision:
required: true
type: string
zlib_revision:
required: true
type: string
zlib_version:
required: true
type: string
brotli_revision:
required: true
type: string
brotli_version:
required: true
type: string
ANDROID_API_LEVEL:
required: true
type: string
ANDROID_NDK_VERSION:
required: true
type: string
ANDROID_CLANG_VERSION:
required: true
type: string
debug_info:
required: true
type: boolean
release:
required: true
type: boolean
signed:
required: true
type: boolean
swift_version:
required: true
type: string
swift_tag:
required: true
type: string
default_build_runner:
required: true
type: string
compilers_build_runner:
required: true
type: string
build_android:
required: false
default: false
type: boolean
python_version:
required: true
type: string
use_host_toolchain:
required: false
type: boolean
default: true
secrets:
SYMBOL_SERVER_PAT:
required: true
CERTIFICATE:
required: true
PASSPHRASE:
required: true
R2_ACCOUNT_ID:
required: true
R2_ACCESS_KEY_ID:
required: true
R2_SECRET_ACCESS_KEY:
required: true
AZURE_SP_CREDENTIALS:
required: false
TRUSTED_SIGNING_ACCOUNT:
required: false
TRUSTED_SIGNING_TEST_PROFILE:
required: false
TRUSTED_SIGNING_PROD_PROFILE:
required: false
env:
PINNED_BOOTSTRAP_TOOLCHAIN_VERSION: 6.1.2
# Workaround to build the early swift-driver without the workaround for the MSVC version.
WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_REPO: thebrowsercompany/swift-build
WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_VERSION: 6.2.0-20250630.0
defaults:
run:
shell: pwsh
permissions:
id-token: write
attestations: write
jobs:
sqlite:
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} SQLite3
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-sqlite
- uses: actions/[email protected]
with:
repository: swiftlang/swift-toolchain-sqlite
ref: ${{ inputs.swift_toolchain_sqlite_revision }}
path: ${{ github.workspace }}/SourceCache/swift-toolchain-sqlite
show-progress: false
- name: Configure SQLite
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: SQLite
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-toolchain-sqlite
bin-dir: ${{ github.workspace }}/BinaryCache/sqlite-${{ inputs.swift_toolchain_sqlite_version }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C")' }}
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build SQLite
run: cmake --build ${{ github.workspace }}/BinaryCache/sqlite-${{ inputs.swift_toolchain_sqlite_version }}
- name: Install SQLite
run: cmake --build ${{ github.workspace }}/BinaryCache/sqlite-${{ inputs.swift_toolchain_sqlite_version }} --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-sqlite-${{ inputs.swift_toolchain_sqlite_version }}
path: ${{ github.workspace }}/BuildRoot/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr
ds2_tools:
# TODO: Build this on macOS or make an equivalent Mac-only job
runs-on: ${{ inputs.default_build_runner }}
name: ds2 Build Tools
steps:
- uses: actions/[email protected]
if: inputs.build_android
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
if: inputs.build_android
with:
setup-vs-dev-env: true
- name: Compute workspace hash
if: inputs.build_android
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
if: inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 1M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ inputs.build_os }}-${{ inputs.build_arch }}-ds2_tools
- uses: actions/[email protected]
# There is currently no Android NDK for Windows ARM64 so build ds2_tools only on Windows X64 host only
if: inputs.build_android
with:
repository: compnerd/ds2
ref: ${{ inputs.ds2_revision }}
path: ${{ github.workspace }}/SourceCache/ds2
show-progress: false
# TODO(issues/205): Preload Chocolatey package manager on Azure images so we can remove this step.
- uses: andrurogerz/ensure-chocolatey@v1
if: inputs.build_android
- name: Install Flex and Bison Tools
run: choco install winflexbison3
if: inputs.build_android
- name: Configure RegsGen2
if: inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: RegsGen2
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ inputs.build_os }}
arch: ${{ inputs.build_arch }}
src-dir: ${{ github.workspace }}/SourceCache/ds2/Tools/RegsGen2
bin-dir: ${{ github.workspace }}/BinaryCache/RegsGen2
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C", "CXX")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C", "CXX")' }}
cache-script: ${{ github.workspace }}/SourceCache/ds2/cmake/caches/MSVCWarnings.cmake
cmake-defines: |
@{
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_CXX_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build RegsGen2
if: inputs.build_android
run: cmake --build ${{ github.workspace }}/BinaryCache/RegsGen2 --config Release
- uses: actions/upload-artifact@v4
if: inputs.build_android
with:
name: Windows-${{ inputs.build_arch }}-regsgen2
path: |
${{ github.workspace }}/BinaryCache/RegsGen2/regsgen2.exe
ds2:
# TODO: Build this on macOS or make an equivalent Mac-only job
needs: [ds2_tools]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: arm64
os: Android
module_triple: aarch64-unknown-linux-android
- arch: armv7
os: Android
module_triple: armv7-unknown-linux-android
- arch: i686
os: Android
module_triple: i686-unknown-linux-android
- arch: x86_64
os: Android
module_triple: x86_64-unknown-linux-android
name: ${{ matrix.os }} ${{ matrix.arch }} ds2
steps:
- uses: actions/[email protected]
if: inputs.build_android
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
if: inputs.build_android
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
- name: Compute workspace hash
if: inputs.build_android
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
if: inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 1M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ inputs.build_os }}-${{ inputs.build_arch }}-ds2
- uses: actions/[email protected]
# There is currently no Android NDK for Windows ARM64 so build ds2 only on Windows X64 host only
if: inputs.build_android
with:
repository: compnerd/ds2
ref: ${{ inputs.ds2_revision }}
path: ${{ github.workspace }}/SourceCache/ds2
show-progress: false
# TODO(issues/205): Preload Chocolatey package manager on Azure images so we can remove this step.
- uses: andrurogerz/ensure-chocolatey@v1
if: inputs.build_android
- name: Install Flex and Bison Tools
if: inputs.build_android
run: choco install winflexbison3
- uses: actions/download-artifact@v4
if: inputs.build_android
with:
name: Windows-${{ inputs.build_arch }}-regsgen2
path: ${{ github.workspace }}/BinaryCache/RegsGen2
- uses: nttld/setup-ndk@v1
if: inputs.build_android
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Configure DS2
if: inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: DS2
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/ds2
bin-dir: ${{ github.workspace }}/BinaryCache/ds2
install-dir: ${{ github.workspace }}/BinaryCache/Library/Developer/ds2/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
pinned-compilers: '@("C", "CXX")'
cmake-defines: |
@{
'DS2_REGSGEN2' = "${{ github.workspace }}/BinaryCache/RegsGen2/regsgen2.exe";
'DS2_PROGRAM_PREFIX' = "${{ matrix.module_triple }}-";
}
- name: Build DS2
if: inputs.build_android
run: cmake --build ${{ github.workspace }}/BinaryCache/ds2
- name: Install DS2
if: inputs.build_android
run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --target install
- uses: actions/upload-artifact@v4
if: inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-ds2
path: ${{ github.workspace }}/BinaryCache/Library/Developer
cmark_gfm:
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} CMark GFM
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 1M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-cmark-gfm
- uses: actions/[email protected]
with:
repository: swiftlang/swift-cmark
ref: ${{ inputs.swift_cmark_revision }}
path: ${{ github.workspace }}/SourceCache/cmark-gfm
show-progress: false
- name: Configure cmark-gfm
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: cmark-gfm
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/cmark-gfm
bin-dir: ${{ github.workspace }}/BinaryCache/cmark-gfm-${{ inputs.swift_cmark_version }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C", "CXX")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C", "CXX")' }}
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'BUILD_TESTING' = "NO";
'CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP' = "YES";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_CXX_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build cmark-gfm
run: cmake --build ${{ github.workspace }}/BinaryCache/cmark-gfm-${{ inputs.swift_cmark_version }}
- name: Install cmark-gfm
run: cmake --build ${{ github.workspace }}/BinaryCache/cmark-gfm-${{ inputs.swift_cmark_version }} --target install
- uses: thebrowsercompany/gha-upload-tar-artifact@e18c33b1cd416d0d96a91dc6dce06219f98e4e27 # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-cmark-gfm-${{ inputs.swift_cmark_version }}
path: ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr
build_tools:
needs: [cmark_gfm]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.build_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} Compiler Build Tools
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-build_tools
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-cmark-gfm-${{ inputs.swift_cmark_version }}
path: ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr
- uses: actions/[email protected]
with:
repository: swiftlang/llvm-project
ref: ${{ inputs.llvm_project_revision }}
path: ${{ github.workspace }}/SourceCache/llvm-project
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
architecture: x64 # FIXME(#1004): Remove workaround installing x64 Python on ARM64 CI hosts
- name: Configure Tools
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: Build Tools
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/llvm-project/llvm
bin-dir: ${{ github.workspace }}/BinaryCache/0
msvc-compilers: ${{ inputs.use_host_toolchain && '@("ASM_MASM", "C", "CXX")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("ASM_MASM", "C", "CXX")' }}
cmake-defines: |
@{
'CMAKE_CROSSCOMPILING' = "NO";
'CLANG_ENABLE_LIBXML2' = "NO";
'LLDB_ENABLE_LIBXML2' = "NO";
'LLDB_ENABLE_PYTHON' = "NO";
'LLDB_INCLUDE_TESTS' = "NO";
'LLDB_ENABLE_SWIFT_SUPPORT' = "NO";
'LLVM_ENABLE_ASSERTIONS' = "NO";
'LLVM_ENABLE_LIBEDIT' = "NO";
'LLVM_ENABLE_LIBXML2' = "NO";
'LLVM_ENABLE_PROJECTS' = "clang;clang-tools-extra;lldb";
'LLVM_EXTERNAL_PROJECTS' = "swift";
'LLVM_EXTERNAL_SWIFT_SOURCE_DIR' = "${{ github.workspace }}/SourceCache/swift";
'SWIFT_BUILD_DYNAMIC_SDK_OVERLAY' = "NO";
'SWIFT_BUILD_DYNAMIC_STDLIB' = "NO";
'SWIFT_BUILD_HOST_DISPATCH' = "NO";
'SWIFT_BUILD_LIBEXEC' = "NO";
'SWIFT_BUILD_REGEX_PARSER_IN_COMPILER' = "NO";
'SWIFT_BUILD_REMOTE_MIRROR' = "NO";
'SWIFT_BUILD_SOURCEKIT' = "NO";
'SWIFT_BUILD_STATIC_SDK_OVERLAY' = "NO";
'SWIFT_BUILD_STATIC_STDLIB' = "NO";
'SWIFT_BUILD_SWIFT_SYNTAX' = "NO";
'SWIFT_ENABLE_DISPATCH' = "NO";
'SWIFT_INCLUDE_APINOTES' = "NO";
'SWIFT_INCLUDE_DOCS' = "NO";
'SWIFT_INCLUDE_TESTS' = "NO";
'cmark-gfm_DIR' = "${{ github.workspace }}/BuildRoot/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/cmake";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_CXX_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build llvm-tblgen
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target llvm-tblgen
- name: Build clang-tblgen
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target clang-tblgen
- name: Build clang-tidy-confusable-chars-gen
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target clang-tidy-confusable-chars-gen
- name: Build lldb-tblgen
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target lldb-tblgen
- name: Build llvm-config
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target llvm-config
- name: Build swift-def-to-strings-converter
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target swift-def-to-strings-converter
- name: Build swift-serialize-diagnostics
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target swift-serialize-diagnostics
- name: Build swift-compatibility-symbols
run: cmake --build ${{ github.workspace }}/BinaryCache/0 --target swift-compatibility-symbols
- name: Copy binaries
run: |
$Suffix = if ( "${{ matrix.os }}" -eq "Windows" ) { ".exe" } else { "" }
$Binaries = @(
"llvm-tblgen",
"clang-tblgen",
"clang-tidy-confusable-chars-gen",
"lldb-tblgen",
"llvm-config",
"swift-def-to-strings-converter",
"swift-serialize-diagnostics",
"swift-compatibility-symbols"
)
# Create the target folder.
New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/bin" -Force | Out-Null
foreach ($Binary in $Binaries) {
Copy-Item -Path "${{ github.workspace }}/BinaryCache/0/bin/${Binary}${Suffix}" -Destination "${{ github.workspace }}/BuildRoot/bin/${Binary}${Suffix}" -Force
}
- uses: thebrowsercompany/gha-upload-tar-artifact@e18c33b1cd416d0d96a91dc6dce06219f98e4e27 # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-build-tools
path: ${{ github.workspace }}/BuildRoot/bin
early_swift_driver:
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.build_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} early swift-driver
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
id: setup-build
with:
host-arch: ${{ matrix.arch }}
swift-version: ${{ inputs.build_os == 'Windows' && env.WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_VERSION || env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}
swift-repo: ${{ inputs.build_os == 'Windows' && env.WORKAROUND_WINDOWS_EARLY_SWIFT_DRIVER_TOOLCHAIN_REPO || '' }}
- uses: actions/[email protected]
with:
repository: swiftlang/swift-llbuild
ref: ${{ inputs.swift_llbuild_revision }}
path: ${{ github.workspace }}/SourceCache/llbuild
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-toolchain-sqlite
ref: ${{ inputs.swift_toolchain_sqlite_revision }}
path: ${{ github.workspace }}/SourceCache/swift-toolchain-sqlite
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-tools-support-core
ref: ${{ inputs.swift_tools_support_core_revision }}
path: ${{ github.workspace }}/SourceCache/swift-tools-support-core
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-argument-parser
ref: ${{ inputs.swift_argument_parser_revision }}
path: ${{ github.workspace }}/SourceCache/swift-argument-parser
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-driver
ref: ${{ inputs.swift_driver_revision }}
path: ${{ github.workspace }}/SourceCache/swift-driver
show-progress: false
- name: Build early swift-driver
run: |
$env:SWIFTCI_USE_LOCAL_DEPS=1
$ExtraFlags = if ("${{ matrix.os }}" -eq "Windows") {
@("-Xlinker", "${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/swiftCore.lib")
} else {
@()
}
swift build `
--configuration release `
--package-path ${{ github.workspace }}/SourceCache/swift-driver `
--build-path ${{ github.workspace }}/BinaryCache/swift-driver `
--triple ${{ matrix.triple }} `
@ExtraFlags
- name: Copy binaries
run: |
if ("${{ matrix.os }}" -eq "Windows") {
$ExeSuffix = ".exe"
$Cpu = if ("${{ matrix.arch }}" -eq "arm64") { "aarch64" } else { "x86_64" }
$SourceBinDir = Join-Path "${{ github.workspace }}" "BinaryCache" "swift-driver" "${Cpu}-unknown-windows-msvc" "release"
} else {
$ExeSuffix = ""
$Cpu = "${{ matrix.arch }}"
$SourceBinDir = Join-Path "${{ github.workspace }}" "BinaryCache" "swift-driver" "${Cpu}-apple-macosx" "release"
}
$InstallBinDir = Join-Path "${{ github.workspace }}" "BuildRoot" "bin"
# Create the target folder.
New-Item -ItemType Directory -Path $InstallBinDir -Force
# Copy binaries.
foreach ($bin in @("swift-driver", "swift-help")) {
$binName = "${bin}${ExeSuffix}"
$binPath = Join-Path $InstallBinDir $binName
Copy-Item -Path "${SourceBinDir}/${binName}" -Destination $binPath -Force
}
- uses: thebrowsercompany/gha-upload-tar-artifact@e18c33b1cd416d0d96a91dc6dce06219f98e4e27 # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-early-swift-driver
path: ${{ github.workspace }}/BuildRoot
compilers:
needs: [libxml2, build_tools, cmark_gfm, early_swift_driver]
runs-on: ${{ inputs.compilers_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.compilers_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.variant }} Toolchain
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
swift-version: ${{ env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
shell: pwsh
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 500M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.variant }}-compilers
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: ${{ inputs.build_os }}-${{ inputs.build_arch }}-build-tools
path: ${{ github.workspace }}/BinaryCache/0/bin
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BinaryCache/Library/libxml2-${{ inputs.libxml2_version }}/usr
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-cmark-gfm-${{ inputs.swift_cmark_version }}
path: ${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: ${{ inputs.build_os }}-${{ inputs.build_arch }}-early-swift-driver
path: ${{ github.workspace }}/BinaryCache/swift-driver
- uses: actions/[email protected]
with:
repository: swiftlang/llvm-project
ref: ${{ inputs.llvm_project_revision }}
path: ${{ github.workspace }}/SourceCache/llvm-project
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-experimental-string-processing
ref: ${{ inputs.swift_experimental_string_processing_revision }}
path: ${{ github.workspace }}/SourceCache/swift-experimental-string-processing
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-syntax
ref: ${{ inputs.swift_syntax_revision }}
path: ${{ github.workspace }}/SourceCache/swift-syntax
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-corelibs-libdispatch
ref: ${{ inputs.swift_corelibs_libdispatch_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
show-progress: false
- name: Install Python ${{ inputs.python_version }} (Host)
if: matrix.os == 'Darwin'
uses: actions/setup-python@v5
with:
python-version: '${{ inputs.python_version }}'
- name: Install Python ${{ inputs.python_version }} (Host)
if: matrix.os == 'Windows' && (matrix.arch == 'amd64' || inputs.build_arch == 'amd64')
uses: actions/setup-python@v5
id: python
with:
python-version: '${{ inputs.python_version }}'
architecture: x64
- uses: nuget/setup-nuget@v2
if: inputs.build_os == 'Windows' && (matrix.arch == 'arm64' || inputs.build_arch == 'arm64')
# TODO(lxbndr) use actions/cache to improve this step timings
- name: Install Python ${{ inputs.python_version}} (Windows arm64)
if: inputs.build_os == 'Windows' && (matrix.arch == 'arm64' || inputs.build_arch == 'arm64')
run: |
$NugetSources=[string](nuget Sources List -Format short)
if (-Not ($NugetSources.contains("api.nuget.org"))) {
nuget sources Add -Name api.nuget.org -Source https://api.nuget.org/v3/index.json -NonInteractive
}
nuget install pythonarm64 -Version ${{ inputs.python_version}}
- name: Export Python Location (Windows)
if: inputs.build_os == 'Windows'
run: |
echo "PYTHON_LOCATION_amd64=$env:pythonLocation" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "PYTHON_LOCATION_arm64=${{ github.workspace }}\pythonarm64.${{ inputs.python_version }}\tools" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android'
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
architecture: x64 # FIXME(#1004): Remove workaround installing x64 Python on ARM64 CI hosts
- name: Setup context
id: setup-context
run: |
if ( "${{ matrix.os }}" -eq "Windows" ) {
$CLANG_LOCATION = cygpath -m $(Split-Path (Get-Command swiftc).Source)
$SDKROOT = cygpath -m ${env:SDKROOT}
$LIBPYTHON_PATH = "${env:PYTHON_LOCATION_${{ matrix.arch }}}/libs/python310.lib"
$PYTHON_INCLUDE_DIR = "${env:PYTHON_LOCATION_${{ matrix.arch }}}/include"
$PYTHON_BINARY="python.exe"
} elseif ( "${{ matrix.os }}" -eq "Darwin" ) {
$CLANG_LOCATION = "${env:HOME}/Library/Developer/Toolchains/swift-${{ env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}-RELEASE.xctoolchain/usr/bin"
$SDKROOT = xcrun --sdk macosx --show-sdk-path
$LIBPYTHON_PATH = "${env:pythonLocation}/lib/python3.10/config-3.10-darwin/libpython3.10.a"
$PYTHON_INCLUDE_DIR = "${env:pythonLocation}/include/python3.10"
$PYTHON_BINARY="python3"
}
# Compute the number of parallel jobs to use for the build.
$RamBytes = if ($IsWindows) {
(Get-CimInstance -ClassName Win32_ComputerSystem).TotalPhysicalMemory
} elseif ($IsMacOS) {
[int64](sysctl -n hw.memsize)
} else {
throw "Unsupported OS"
}
$RamGB = [math]::Round($RamBytes / 1GB)
# Consider 24 GB per link job, to a minimum of 2 jobs.
$LinkJobs = [math]::Max(2, [math]::Floor($RamGB / 24))
# Output the context for the configure task.
$Context = @"
clang-location=${CLANG_LOCATION}
libpython-path=${LIBPYTHON_PATH}
python-include-dir=${PYTHON_INCLUDE_DIR}
python-binary=${PYTHON_BINARY}
sdkroot=${SDKROOT}
link-jobs=${LinkJobs}
"@
Write-Output $Context | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Configure Compilers
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: Compilers
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/llvm-project/llvm
bin-dir: ${{ github.workspace }}/BinaryCache/1
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+${{ matrix.variant }}/usr
swift-sdk-path: ${{ steps.setup-context.outputs.sdkroot }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C", "CXX")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@("Swift")' || '@("C", "CXX", "Swift")' }}
cache-script: ${{ github.workspace }}/SourceCache/swift/cmake/caches/${{ matrix.os }}-${{ matrix.cpu }}.cmake
cmake-defines: |
@{
'SWIFT_BUILD_DYNAMIC_SDK_OVERLAY' = "NO";
'SWIFT_BUILD_DYNAMIC_STDLIB' = "NO";
'SWIFT_BUILD_REMOTE_MIRROR' = "NO";
'SWIFT_NATIVE_SWIFT_TOOLS_PATH' = "${{ github.workspace }}/BinaryCache/0/bin";
'CLANG_TABLEGEN' = "${{ github.workspace }}/BinaryCache/0/bin/clang-tblgen${ExeSuffix}";
'CLANG_TIDY_CONFUSABLE_CHARS_GEN' = "${{ github.workspace }}/BinaryCache/0/bin/clang-tidy-confusable-chars-gen${ExeSuffix}";
'LibXml2_DIR' = "${{ github.workspace }}/BinaryCache/Library/libxml2-${{ inputs.libxml2_version }}/usr/lib/cmake/libxml2-${{ inputs.libxml2_version }}";
'LLDB_LIBXML2_VERSION' = "${{ inputs.libxml2_version }}";
'LLDB_PYTHON_EXE_RELATIVE_PATH' = "${{ steps.setup-context.outputs.python-binary }}";
'LLDB_PYTHON_EXT_SUFFIX' = ".pyd";
'LLDB_PYTHON_RELATIVE_PATH' = "lib/site-packages";
'LLDB_TABLEGEN' = "${{ github.workspace }}/BinaryCache/0/bin/lldb-tblgen${ExeSuffix}";
'LLVM_CONFIG_PATH' = "${{ github.workspace }}/BinaryCache/0/bin/llvm-config${ExeSuffix}";
'LLVM_ENABLE_ASSERTIONS' = ${{ matrix.variant == 'Asserts' && '"YES"' || '"NO"' }};
'LLVM_ENABLE_LLD' = "${{ inputs.use_host_toolchain && 'NO' || 'YES' }}";
'LLVM_EXTERNAL_SWIFT_SOURCE_DIR' = "${{ github.workspace }}/SourceCache/swift";
'LLVM_HOST_TRIPLE' = "${{ matrix.triple }}";
'LLVM_NATIVE_TOOL_DIR' = "${{ github.workspace }}/BinaryCache/0/bin";
'LLVM_TABLEGEN' = "${{ github.workspace }}/BinaryCache/0/bin/llvm-tblgen${ExeSuffix}";
'LLVM_USE_HOST_TOOLS' = "NO";
'Python3_EXECUTABLE' = "${{ steps.python.outputs.python-path }}";
'Python3_INCLUDE_DIR' = "${{ steps.setup-context.outputs.python-include-dir }}";
'Python3_LIBRARY' = "${{ steps.setup-context.outputs.libpython-path }}";
'Python3_ROOT_DIR' = $env:pythonLocation;
'SWIFT_TOOLCHAIN_VERSION' = "${{ inputs.swift_version}} ${{ inputs.swift_tag }}";
'SWIFT_BUILD_SWIFT_SYNTAX' = "YES";
'SWIFT_CLANG_LOCATION' = "${{ steps.setup-context.outputs.clang-location }}";
'SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_CXX_INTEROP' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_OBSERVATION' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING' = "YES";
'SWIFT_ENABLE_SYNCHRONIZATION' = "YES";
'SWIFT_ENABLE_VOLATILE' = "YES";
'SWIFT_PATH_TO_LIBDISPATCH_SOURCE' = "${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch";
'SWIFT_PATH_TO_STRING_PROCESSING_SOURCE' = "${{ github.workspace }}/SourceCache/swift-experimental-string-processing";
'SWIFT_PATH_TO_SWIFT_SDK' = "${{ steps.setup-context.outputs.sdkroot }}";
'SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE' = "${{ github.workspace }}/SourceCache/swift-syntax";
'SWIFT_STDLIB_ASSERTIONS' = "NO";
'SWIFTSYNTAX_ENABLE_ASSERTIONS' = "NO";
'cmark-gfm_DIR' = "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/cmake";
'CLANG_VENDOR' = 'compnerd.org';
'CLANG_VENDOR_UTI' = 'org.compnerd.dt';
'LLVM_APPEND_VC_REV' = "NO";
'LLVM_VERSION_SUFFIX' = "";
'LLVM_PARALLEL_LINK_JOBS' = "${{ steps.setup-context.outputs.link-jobs }}";
'SWIFT_PARALLEL_LINK_JOBS' = "${{ steps.setup-context.outputs.link-jobs }}";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_CXX_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_Swift_FLAGS' = "${{ !inputs.use_host_toolchain && '-use-ld=lld' || '' }}";
}
- name: Build Compiler Distribution
run: cmake --build ${{ github.workspace }}/BinaryCache/1 --target distribution
- name: Install Compiler Distribution
run: cmake --build ${{ github.workspace }}/BinaryCache/1 --target install-distribution-stripped
- name: Copy cmark-gfm shared libraries
run: |
if ("${{ matrix.os }}" -eq "Windows") {
Copy-Item -Path "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/bin/*.dll" -Destination "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+${{ matrix.variant }}/usr/bin"
} else {
Copy-Item -Path "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/*.dylib" -Destination "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+${{ matrix.variant }}/usr/lib/swift/host/compiler"
}
- uses: jannekem/run-python-script-action@v1
with:
script: |
import os
import plistlib
from datetime import datetime
now = datetime.now()
info_plist = r'${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+${{ matrix.variant }}/ToolchainInfo.plist'
with open(os.path.normpath(info_plist), 'wb') as plist:
plistlib.dump({ 'Identifier': 'org.compnerd.dt.toolchain.{0}.{1}-asserts'.format(now.strftime('%Y%m%d'), now.timetuple().tm_hour % 6) }, plist)
- name: Upload Compilers
uses: thebrowsercompany/gha-upload-tar-artifact@e18c33b1cd416d0d96a91dc6dce06219f98e4e27 # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.variant }}-compilers
path: ${{ github.workspace }}/BuildRoot/Library
- name: Extract swift-syntax
run: |
New-Item -Path ${{ github.workspace }}/BinaryCache/swift-syntax/lib/swift/host -ItemType Directory | Out-Null
$ToolchainRoot = "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+${{ matrix.variant }}"
if ("${{ matrix.os }}" -eq "Windows") {
$bindir = cygpath -m "${{ github.workspace }}/BinaryCache/1"
Copy-Item -Path "${ToolchainRoot}/usr/lib/*.lib" -Destination "${{ github.workspace }}/BinaryCache/swift-syntax/lib"
Copy-Item -Path "${ToolchainRoot}/usr/lib/*.lib" -Destination "${{ github.workspace }}/BinaryCache/swift-syntax/lib/swift/host"
} else {
$bindir = "${{ github.workspace }}/BinaryCache/1"
Copy-Item -Path "${ToolchainRoot}/usr/lib/*.dylib" -Destination "${{ github.workspace }}/BinaryCache/swift-syntax/lib"
Copy-Item -Path "${ToolchainRoot}/usr/lib/swift/host/*.dylib" -Destination "${{ github.workspace }}/BinaryCache/swift-syntax/lib/swift/host"
}
Copy-Item -Path "${ToolchainRoot}/usr/lib/swift/host/*.swiftmodule" -Destination "${{ github.workspace }}/BinaryCache/swift-syntax/lib/swift/host" -Recurse
$module = "${{ github.workspace }}/BinaryCache/1/cmake/modules/SwiftSyntaxConfig.cmake"
(Get-Content $module).Replace("${bindir}", '<BINARY_DIR>') | Set-Content $module
New-Item -Path ${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules -ItemType Directory | Out-Null
Copy-Item -Path $module -Destination "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules"
- name: Upload swift-syntax
uses: thebrowsercompany/gha-upload-tar-artifact@e18c33b1cd416d0d96a91dc6dce06219f98e4e27 # main
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.variant }}-swift-syntax
path: ${{ github.workspace }}/BinaryCache/swift-syntax
# TODO(compnerd) this takes ~1h due to the size, see if we can compress first
- uses: actions/upload-artifact@v4
if: false # ${{ inputs.debug_info }}
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.variant }}-compilers-debug-info
path: |
${{ github.workspace }}/BinaryCache/1/**/*.pdb
- name: Upload PDBs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache/1
searchPattern: '**/*.pdb'
- name: Upload DLLs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache/1
searchPattern: '**/*.dll'
- name: Upload EXEs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache/1
searchPattern: '**/*.exe'
zlib:
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.target_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} zlib
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-zlib
- uses: actions/[email protected]
with:
repository: madler/zlib
ref: ${{ inputs.zlib_revision }}
path: ${{ github.workspace }}/SourceCache/zlib
show-progress: false
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android'
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Configure zlib
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: zlib
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/zlib
bin-dir: ${{ github.workspace }}/BinaryCache/zlib-${{ inputs.zlib_version }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C")' }}
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_POSITION_INDEPENDENT_CODE' = "YES";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build zlib
run: cmake --build ${{ github.workspace }}/BinaryCache/zlib-${{ inputs.zlib_version }}
- name: Install zlib
run: cmake --build ${{ github.workspace }}/BinaryCache/zlib-${{ inputs.zlib_version }} --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr
brotli:
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.target_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} brotli
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-brotli
- uses: actions/[email protected]
with:
repository: google/brotli
ref: ${{ inputs.brotli_revision }}
path: ${{ github.workspace }}/SourceCache/brotli
show-progress: false
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android'
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Configure brotli
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: brotli
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/brotli
bin-dir: ${{ github.workspace }}/BinaryCache/brotli-${{ inputs.brotli_version }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C")' }}
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_POSITION_INDEPENDENT_CODE' = "YES";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build brotli
run: cmake --build ${{ github.workspace }}/BinaryCache/brotli-${{ inputs.brotli_version }}
- name: Install brotli
run: cmake --build ${{ github.workspace }}/BinaryCache/brotli-${{ inputs.brotli_version }} --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr
curl:
needs: [zlib, brotli]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.target_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} curl
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-curl
- uses: actions/[email protected]
with:
repository: curl/curl
ref: ${{ inputs.curl_revision }}
path: ${{ github.workspace }}/SourceCache/curl
show-progress: false
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android'
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Configure curl
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: curl
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/curl
bin-dir: ${{ github.workspace }}/BinaryCache/curl-${{ inputs.curl_version }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/curl-${{ inputs.curl_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C")' }}
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'BUILD_TESTING' = "NO";
'CMAKE_POSITION_INDEPENDENT_CODE' = "YES";
'BUILD_CURL_EXE' = "NO";
'BUILD_LIBCURL_DOCS' = "NO";
'BUILD_MISC_DOCS' = "NO";
'CURL_CA_BUNDLE' = "none";
'CURL_CA_FALLBACK' = "NO";
'CURL_CA_PATH' = "none";
'CURL_BROTLI' = "YES";
'CURL_DISABLE_ALTSVC' = "NO";
'CURL_DISABLE_AWS' = "YES";
'CURL_DISABLE_BASIC_AUTH' = "NO";
'CURL_DISABLE_BEARER_AUTH' = "NO";
'CURL_DISABLE_BINDLOCAL' = "NO";
'CURL_DISABLE_COOKIES' = "NO";
'CURL_DISABLE_DICT' = "YES";
'CURL_DISABLE_DIGEST_AUTH' = "NO";
'CURL_DISABLE_DOH' = "NO";
'CURL_DISABLE_FILE' = "YES";
'CURL_DISABLE_FORM_API' = "NO";
'CURL_DISABLE_FTP' = "YES";
'CURL_DISABLE_GETOPTIONS' = "NO";
'CURL_DISABLE_GOPHER' = "YES";
'CURL_DISABLE_HEADERS_API' = "YES";
'CURL_DISABLE_HSTS' = "NO";
'CURL_DISABLE_HTTP' = "NO";
'CURL_DISABLE_HTTP_AUTH' = "NO";
'CURL_DISABLE_IMAP' = "YES";
'CURL_DISABLE_KERBEROS_AUTH' = "NO";
'CURL_DISABLE_LDAP' = "YES";
'CURL_DISABLE_LDAPS' = "YES";
'CURL_DISABLE_MIME' = "NO";
'CURL_DISABLE_MQTT' = "YES";
'CURL_DISABLE_NEGOTIATE_AUTH' = "NO";
'CURL_DISABLE_NETRC' = "NO";
'CURL_DISABLE_NTLM' = "NO";
'CURL_DISABLE_PARSEDATE' = "NO";
'CURL_DISABLE_POP3' = "YES";
'CURL_DISABLE_PROGRESS_METER' = "YES";
'CURL_DISABLE_PROXY' = "NO";
'CURL_DISABLE_RTSP' = "YES";
'CURL_DISABLE_SHUFFLE_DNS' = "YES";
'CURL_DISABLE_SMB' = "YES";
'CURL_DISABLE_SMTP' = "YES";
'CURL_DISABLE_SOCKETPAIR' = "YES";
'CURL_DISABLE_SRP' = "NO";
'CURL_DISABLE_TELNET' = "YES";
'CURL_DISABLE_TFTP' = "YES";
'CURL_DISABLE_VERBOSE_STRINGS' = "NO";
'CURL_LTO' = "NO";
'CURL_USE_BEARSSL' = "NO";
'CURL_USE_GNUTLS' = "NO";
'CURL_USE_GSSAPI' = "NO";
'CURL_USE_LIBPSL' = "NO";
'CURL_USE_LIBSSH' = "NO";
'CURL_USE_LIBSSH2' = "NO";
'CURL_USE_MBEDTLS' = "NO";
'CURL_USE_OPENSSL' = "NO";
'CURL_USE_SCHANNEL' = if ("${{ matrix.os }}" -eq "Windows") { "YES" } else { "NO" };
'CURL_USE_WOLFSSL' = "NO";
'CURL_WINDOWS_SSPI' = if ("${{ matrix.os }}" -eq "Windows") { "YES" } else { "NO" };
'CURL_ZLIB' = "YES";
'CURL_ZSTD' = "NO";
'ENABLE_ARES' = "NO";
'ENABLE_CURLDEBUG' = "NO";
'ENABLE_CURL_MANUAL' = "NO";
'ENABLE_DEBUG' = "NO";
'ENABLE_IPV6' = "YES";
'ENABLE_THREADED_RESOLVER' = "NO";
'ENABLE_UNICODE' = "YES";
'ENABLE_UNIX_SOCKETS' = "NO";
'ENABLE_WEBSOCKETS' = "YES";
'HAVE_POLL_FINE' = "NO";
'USE_ECH' = "NO";
'USE_HTTPSRR' = "NO";
'USE_IDN2' = "NO";
'USE_MSH3' = "NO";
'USE_NGHTTP2' = "NO";
'USE_NGTCP2' = "NO";
'USE_QUICHE' = "NO";
'USE_OPENSSL_QUIC' = "NO";
'USE_WIN32_IDN' = if ("${{ matrix.os }}" -eq "Windows") { "YES" } else { "NO" };
'USE_WIN32_LARGE_FILES' = if ("${{ matrix.os }}" -eq "Windows") { "YES" } else { "NO" };
'USE_WIN32_LDAP' = "NO";
'ZLIB_ROOT' = "${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr";
'ZLIB_LIBRARY' = "${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr/lib/zlibstatic.lib";
'BROTLI_INCLUDE_DIR' = "${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr/include";
'BROTLICOMMON_LIBRARY' = "${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr/lib/$(if ("${{ matrix.os }}" -eq "Windows") { "brotlicommon.lib" } else { "libbrotlicommon.a" })";
'BROTLIDEC_LIBRARY' = "${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr/lib/$(if ("${{ matrix.os }}" -eq "Windows") { "brotlidec.lib" } else { "libbrotlidec.a" })";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build curl
run: cmake --build ${{ github.workspace }}/BinaryCache/curl-${{ inputs.curl_version }}
- name: Install curl
run: cmake --build ${{ github.workspace }}/BinaryCache/curl-${{ inputs.curl_version }} --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-curl-${{ inputs.curl_version }}
path: ${{ github.workspace }}/BuildRoot/Library/curl-${{ inputs.curl_version }}/usr
libxml2:
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.target_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} libxml2
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
id: workspace_hash
shell: pwsh
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-libxml2
- uses: actions/[email protected]
with:
repository: gnome/libxml2
ref: ${{ inputs.libxml2_revision }}
path: ${{ github.workspace }}/SourceCache/libxml2
show-progress: false
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android'
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Configure libxml2
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: libxml2
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/libxml2
bin-dir: ${{ github.workspace }}/BinaryCache/libxml2-${{ inputs.libxml2_version }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/libxml2-${{ inputs.libxml2_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C", "CXX")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C", "CXX")' }}
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_POSITION_INDEPENDENT_CODE' = "YES";
'LIBXML2_WITH_ICONV' = "NO";
'LIBXML2_WITH_ICU' = "NO";
'LIBXML2_WITH_LZMA' = "NO";
'LIBXML2_WITH_PYTHON' = "NO";
'LIBXML2_WITH_TESTS' = "NO";
'LIBXML2_WITH_THREADS' = "YES";
'LIBXML2_WITH_ZLIB' = "NO";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_CXX_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build libxml2
run: cmake --build ${{ github.workspace }}/BinaryCache/libxml2-${{ inputs.libxml2_version }}
- name: Install libxml2
run: cmake --build ${{ github.workspace }}/BinaryCache/libxml2-${{ inputs.libxml2_version }} --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BuildRoot/Library/libxml2-${{ inputs.libxml2_version }}/usr
stdlib:
needs: [compilers]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.target_matrix) }}
name: ${{ matrix.os }} ${{ matrix.arch }} Standard Library
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
if: matrix.os != 'Android' || inputs.build_android
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
swift-version: ${{ env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
if: inputs.build_os == 'Darwin'
- name: Compute workspace hash
if: matrix.os != 'Android' || inputs.build_android
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 500M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-stdlib
- name: Download Compilers
if: matrix.os != 'Android' || inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: ${{ inputs.build_os }}-${{ inputs.build_arch }}-Asserts-compilers
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/llvm-project
ref: ${{ inputs.llvm_project_revision }}
path: ${{ github.workspace }}/SourceCache/llvm-project
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-corelibs-libdispatch
ref: ${{ inputs.swift_corelibs_libdispatch_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift-experimental-string-processing
ref: ${{ inputs.swift_experimental_string_processing_revision }}
path: ${{ github.workspace }}/SourceCache/swift-experimental-string-processing
show-progress: false
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android' && inputs.build_android
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
architecture: x64 # FIXME(#1004): Remove workaround installing x64 Python on ARM64 CI hosts
- name: Configure LLVM
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: llvm
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/llvm-project/llvm
bin-dir: ${{ github.workspace }}/BinaryCache/llvm
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
msvc-compilers: ${{ inputs.use_host_toolchain && '@("ASM_MASM", "C", "CXX")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("ASM_MASM", "C", "CXX")' }}
cmake-defines: |
@{
'LLVM_ENABLE_ASSERTIONS' = "YES";
'LLVM_HOST_TRIPLE' = "${{ matrix.triple }}";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
'CMAKE_CXX_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Configure Swift Standard Library
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-runtime
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift
bin-dir: ${{ github.workspace }}/BinaryCache/swift
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX", "Swift")'
cache-script: ${{ github.workspace }}/SourceCache/swift/cmake/caches/Runtime-${{ matrix.os == 'Darwin' && 'MacOSX' || matrix.os }}-${{ matrix.cpu }}.cmake
cmake-defines: |
@{
'LLVM_DIR' = "${{ github.workspace }}/BinaryCache/llvm/lib/cmake/llvm";
'SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_CXX_INTEROP' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_OBSERVATION' = "YES";
'SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING' = "YES";
'SWIFT_ENABLE_SYNCHRONIZATION' = "YES";
'SWIFT_ENABLE_VOLATILE' = "YES";
'SWIFT_NATIVE_SWIFT_TOOLS_PATH' = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin";
'SWIFT_PATH_TO_LIBDISPATCH_SOURCE' = "${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch";
'SWIFT_PATH_TO_STRING_PROCESSING_SOURCE' = "${{ github.workspace }}/SourceCache/swift-experimental-string-processing";
}
- name: Build Swift Standard Library
if: matrix.os != 'Android' || inputs.build_android
run: |
if ("${{ inputs.build_os }}" -eq "Windows") {
Remove-Item env:\SDKROOT
}
cmake --build ${{ github.workspace }}/BinaryCache/swift
- name: Install Swift Standard Library
if: matrix.os != 'Android' || inputs.build_android
run: |
if ("${{ inputs.build_os }}" -eq "Windows") {
Remove-Item env:\SDKROOT
}
cmake --build ${{ github.workspace }}/BinaryCache/swift --target install
- uses: thebrowsercompany/gha-upload-tar-artifact@e18c33b1cd416d0d96a91dc6dce06219f98e4e27 # main
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- name: Upload PDBs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.pdb'
- name: Upload DLLs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.dll'
macros:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
needs: [compilers, cmark_gfm, stdlib]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
name: Windows ${{ matrix.arch }} Macros
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
# FIXME(compnerd): workaround CMake 3.30+ issue
- uses: lukka/get-cmake@aa1df13cce8c30d2cb58efa871271c5a764623f8 # main
with:
cmakeVersion: 3.29.9
- name: Download Compilers
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ inputs.build_arch }}-Asserts-compilers
path: ${{ github.workspace }}/BinaryCache/Library
- name: Download swift-syntax
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-Asserts-swift-syntax
path: ${{ github.workspace }}/BinaryCache/swift-syntax
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
if: matrix.arch == 'arm64'
with:
name: Windows-${{ inputs.build_arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/[email protected]
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-foundation
ref: ${{ inputs.swift_foundation_revision }}
path: ${{ github.workspace }}/SourceCache/swift-foundation
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-testing
ref: ${{ inputs.swift_testing_revision }}
path: ${{ github.workspace }}/SourceCache/swift-testing
show-progress: false
- run: |
$RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Extract swift-syntax
run: |
$module = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules/SwiftSyntaxConfig.cmake"
$bindir = cygpath -m ${{ github.workspace }}/BinaryCache/swift-syntax
(Get-Content $module).Replace('<BINARY_DIR>', "${bindir}") | Set-Content $module
- name: Configure Foundation Macros
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-foundation-macros
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-foundation/Sources/FoundationMacros
bin-dir: ${{ github.workspace }}/BinaryCache/swift-foundation-macros
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'SwiftSyntax_DIR' = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules";
}
- name: Build Foundation Macros
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-foundation-macros
- name: Configure Testing Macros
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-testing-macros
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-testing/Sources/TestingMacros
bin-dir: ${{ github.workspace }}/BinaryCache/swift-testing-macros
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'SwiftSyntax_DIR' = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules";
}
- name: Build Testing Macros
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-testing-macros
- name: Install Foundation Macros
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-foundation-macros --target install
- name: Install Testing Macros
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-testing-macros --target install
- name: Upload macros
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-macros
path: ${{ github.workspace }}/BuildRoot/Library
- name: Upload PDBs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache/swift-foundation-macros
searchPattern: '**/*.pdb'
- name: Upload DLLs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache/swift-foundation-macros
searchPattern: '**/*.dll'
experimental-sdk:
if: inputs.build_os == 'Windows'
needs: [compilers, stdlib, macros]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix:
include:
- os: Windows
arch: amd64
triple: x86_64-unknown-windows-msvc
static: true
- os: Windows
arch: amd64
triple: x86_64-unknown-windows-msvc
static: false
- os: Windows
arch: arm64
triple: aarch64-unknown-windows-msvc
static: true
- os: Windows
arch: arm64
triple: aarch64-unknown-windows-msvc
static: false
- os: Windows
arch: x86
triple: i686-unknown-windows-msvc
static: true
- os: Windows
arch: x86
triple: i686-unknown-windows-msvc
static: false
- os: Android
arch: arm64
triple: 'aarch64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}'
static: true
- os: Android
arch: armv7
triple: 'armv7-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }}'
static: true
- os: Android
arch: i686
triple: 'i686-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}'
static: true
- os: Android
arch: x86_64
triple: 'x86_64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}'
static: true
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.static && 'static' || 'shared' }} Experimental SDK
steps:
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
if: matrix.os != 'Android' || inputs.build_android
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
# FIXME(compnerd): workaround CMake 3.30+ issue
- uses: lukka/get-cmake@aa1df13cce8c30d2cb58efa871271c5a764623f8 # main
with:
cmakeVersion: 3.29.9
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
architecture: x64 # FIXME(#1004): Remove workaround installing x64 Python on ARM64 CI hosts
- name: Compute workspace hash
if: matrix.os != 'Android' || inputs.build_android
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 500M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.static && 'static' || 'shared' }}-experimental-sdk
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BuildRoot/Library/libxml2-${{ inputs.libxml2_version }}/usr
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-curl-${{ inputs.curl_version }}
path: ${{ github.workspace }}/BuildRoot/Library/curl-${{ inputs.curl_version }}/usr
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr
- name: Download Compilers
if: matrix.os != 'Android' || inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: ${{ inputs.build_os }}-${{ inputs.build_arch }}-Asserts-compilers
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ inputs.build_os }}-${{ inputs.build_arch }}-macros
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ inputs.build_os }}-${{ inputs.build_arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/llvm-project
ref: ${{ inputs.llvm_project_revision }}
path: ${{ github.workspace }}/SourceCache/llvm-project
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-collections
ref: ${{ inputs.swift_collections_revision }}
path: ${{ github.workspace }}/SourceCache/swift-collections
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-corelibs-libdispatch
ref: ${{ inputs.swift_corelibs_libdispatch_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift-corelibs-foundation
ref: ${{ inputs.swift_corelibs_foundation_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-foundation
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-foundation
ref: ${{ inputs.swift_foundation_revision }}
path: ${{ github.workspace }}/SourceCache/swift-foundation
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-foundation-icu
ref: ${{ inputs.swift_foundation_icu_revision }}
path: ${{ github.workspace }}/SourceCache/swift-foundation-icu
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift-experimental-string-processing
ref: ${{ inputs.swift_experimental_string_processing_revision }}
path: ${{ github.workspace }}/SourceCache/swift-experimental-string-processing
show-progress: false
- name: Setup environment
if: matrix.os != 'Android' || inputs.build_android
run: |
$RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android' && inputs.build_android
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Run Resync
if: matrix.os != 'Android' || inputs.build_android
run: |
cd ${{ github.workspace }}/SourceCache/swift/Runtimes
cmake -P Resync.cmake
- name: Configure Dispatch (C parts only)
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: libdispatch-c
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
bin-dir: ${{ github.workspace }}/BinaryCache/libdispatch-c
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'BUILD_TESTING' = "NO";
'ENABLE_SWIFT' = "NO";
}
- name: Build Dispatch (C parts only)
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch-c
- name: Configure Experimental Runtime
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalRuntime
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Core
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalRuntime
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'dispatch_DIR' = "${{ github.workspace }}/BinaryCache/libdispatch-c/cmake/modules";
'SwiftCore_ENABLE_CONCURRENCY' = "YES";
'SwiftCore_ENABLE_REMOTE_MIRROR' = "YES";
'SwiftCore_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental Runtime
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalRuntime
- name: Install Experimental Runtime
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalRuntime --target install
- name: Configure Experimental Overlay
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalOverlay
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Overlay
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalOverlay
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftOverlay_ENABLE_LIBRARY_EVOLUTION' = "NO";
'SwiftOverlay_ENABLE_CXX_INTEROP' = "YES";
}
- name: Build Experimental Overlay
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalOverlay
- name: Install Experimental Overlay
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalOverlay --target install
- name: Configure Experimental String Processing
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalStringProcessing
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/StringProcessing
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalStringProcessing
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftStringProcessing_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental String Processing
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalStringProcessing
- name: Install Experimental String Processing
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalStringProcessing --target install
- name: Configure Experimental Synchronization
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalSynchronization
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Synchronization
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalSynchronization
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftOverlay_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay";
'SwiftSynchronization_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental Synchronization
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalSynchronization
- name: Install Experimental Synchronization
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalSynchronization --target install
- name: Configure Experimental Distributed
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalDistributed
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Distributed
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalDistributed
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_CXX_FLAGS' = "-I${{ github.workspace }}/BinaryCache/ExperimentalRuntime/include";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftOverlay_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay";
'SwiftDistributed_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental Distributed
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDistributed
- name: Install Experimental Distributed
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDistributed --target install
- name: Configure Experimental Observation
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalObservation
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Observation
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalObservation
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("CXX", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_CXX_FLAGS' = "-I${{ github.workspace }}/BinaryCache/ExperimentalRuntime/include"
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftOverlay_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay";
'SwiftObservation_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental Observation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalObservation
- name: Install Experimental Observation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalObservation --target install
- name: Configure Experimental Volatile
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalVolatile
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Volatile
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalVolatile
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_FIND_PACKAGE_PREFER_CONFIG' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftOverlay_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay";
'SwiftVolatile_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental Volatile
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalVolatile
- name: Install Experimental Volatile
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalVolatile --target install
- name: Configure Experimental Differentiation
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalDifferentiation
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Differentiation
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalDifferentiation
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX", "Swift")'
use-gnu-driver: true
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCore_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore";
'SwiftOverlay_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay";
'SwiftDifferentiation_ENABLE_LIBRARY_EVOLUTION' = "NO";
}
- name: Build Experimental Differentiation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDifferentiation
- name: Install Experimental Differentiation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDifferentiation --target install
- name: Configure Experimental Dispatch
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalDispatch
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalDispatch
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("C", "CXX", "Swift")'
swift-sdk-path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_Swift_FLAGS' = ${{ matrix.static && '@("-static-stdlib", "-Xfrontend", "-use-static-resource-dir")' || '@()' }};
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'ENABLE_SWIFT' = "YES";
}
- name: Build Experimental Dispatch
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDispatch
- name: Install Experimental Dispatch
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDispatch --target install
- name: Configure Experimental Foundation
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: ExperimentalFoundation
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-corelibs-foundation
bin-dir: ${{ github.workspace }}/BinaryCache/ExperimentalFoundation
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
built-compilers: '@("ASM","C", "CXX", "Swift")'
swift-sdk-path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "${{ matrix.static && 'NO' || 'YES' }}";
'CMAKE_FIND_PACKAGE_PREFER_CONFIG' = "YES";
'CMAKE_NINJA_FORCE_RESPONSE_FILE' = "YES";
'CMAKE_Swift_FLAGS' = ${{ matrix.static && '@("-static-stdlib", "-Xfrontend", "-use-static-resource-dir")' || '@()' }};
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'ENABLE_TESTING' = "NO";
'FOUNDATION_BUILD_TOOLS' = "${{ matrix.static && matrix.os == 'Windows' && 'YES' || 'NO' }}";
'CURL_DIR' = "${{ github.workspace }}/BuildRoot/Library/curl-${{ inputs.curl_version }}/usr/lib/cmake/CURL";
'LibXml2_DIR' = "${{ github.workspace }}/BuildRoot/Library/libxml2-${{ inputs.libxml2_version }}/usr/lib/cmake/libxml2-${{ inputs.libxml2_version }}";
'ZLIB_INCLUDE_DIR' = "${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr/include";
'ZLIB_LIBRARY' = "${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr/lib/${{ matrix.os == 'Windows' && 'zlibstatic.lib' || 'libz.a' }}";
'dispatch_DIR' = "${{ github.workspace }}/BinaryCache/ExperimentalDispatch/cmake/modules";
'_SwiftFoundation_SourceDIR' = "${{ github.workspace }}/SourceCache/swift-foundation";
'_SwiftFoundationICU_SourceDIR' = "${{ github.workspace }}/SourceCache/swift-foundation-icu";
'_SwiftCollections_SourceDIR' = "${{ github.workspace }}/SourceCache/swift-collections";
'SwiftFoundation_MACRO' = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin";
}
- name: Build Experimental Foundation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalFoundation
- name: Install Experimental Foundation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalFoundation --target install
- uses: actions/setup-python@v5
- uses: jannekem/run-python-script-action@v1
if: matrix.os != 'Android' || inputs.build_android
with:
script: |
import os
import plistlib
info_plist = r'${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Info.plist'
with open(os.path.normpath(info_plist), 'wb') as plist:
# TODO(compnerd) derive this from the install directory
plistlib.dump({ 'DefaultProperties': { 'XCTEST_VERSION': '${{ inputs.swift_version }}', 'TESTING_VERSION': '${{ inputs.swift_version }}', 'SWIFTC_FLAGS': ['-use-ld=lld'] } }, plist)
sdk_settings_plist = r'${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/SDKSettings.plist'
with open(os.path.normpath(sdk_settings_plist), 'wb') as plist:
# TODO(compnerd) derive this from the CMAKE_BUILD_TYPE for the
# runtime.
plistlib.dump({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }, plist)
- name: Create SDKSettings.json
if: matrix.os != 'Android' || inputs.build_android
run: |
$SDKSettings = @{
CanonicalName = "${{ matrix.triple }}"
DisplayName = "${{ matrix.os }}"
IsBaseSDK = "NO"
Version = "${{ inputs.swift_version }}"
VersionMap = @{}
DefaultProperties = @{
PLATFORM_NAME = "${{ matrix.os }}"
DEFAULT_COMPILER = [string]::Format(".org.compnerd.dt.toolchain.{0}.{1}-asserts", (Get-Date -Format "yyyymmdd"), ((Get-Date).Hour % 6))
}
}
if ("${{ matrix.os }}" -eq "Windows") {
$SDKSettings.DefaultProperties.DEFAULT_USE_RUNTIME = "MD"
}
New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk" -Force | Out-Null
$SDKSettings | ConvertTo-JSON | Out-File -FilePath "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/SDKSettings.json"
- uses: actions/upload-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.static && 'static' || 'shared' }}-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform
- name: Upload PDBs to Azure
if: matrix.os == 'Windows' && inputs.debug_info
uses: microsoft/[email protected]
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.pdb'
- name: Upload DLLs to Azure
if: matrix.os == 'Windows' && inputs.debug_info
uses: microsoft/[email protected]
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.dll'
sdk:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
needs: [libxml2, curl, zlib, brotli, compilers, cmark_gfm, stdlib, macros]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
triple: 'x86_64-unknown-windows-msvc'
bindir: 'bin64'
os: Windows
- arch: arm64
triple: 'aarch64-unknown-windows-msvc'
bindir: 'bin64a'
os: Windows
- arch: x86
triple: 'i686-unknown-windows-msvc'
bindir: 'bin32'
os: Windows
- arch: arm64
triple: 'aarch64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}'
bindir: 'bin64a'
os: Android
- arch: armv7
triple: 'armv7a-unknown-linux-androideabi${{ inputs.ANDROID_API_LEVEL }}'
bindir: 'bin32a'
os: Android
- arch: i686
triple: 'i686-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}'
bindir: 'bin32'
os: Android
- arch: x86_64
triple: 'x86_64-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }}'
bindir: 'bin64'
os: Android
name: ${{ matrix.os }} ${{ matrix.arch }} SDK
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
if: matrix.os != 'Android' || inputs.build_android
with:
setup-vs-dev-env: ${{ matrix.os == 'Windows' }}
host-arch: ${{ matrix.arch }}
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 500M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-sdk
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BuildRoot/Library/libxml2-${{ inputs.libxml2_version }}/usr
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-curl-${{ inputs.curl_version }}
path: ${{ github.workspace }}/BuildRoot/Library/curl-${{ inputs.curl_version }}/usr
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr
- name: Download Compilers
if: matrix.os != 'Android' || inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ inputs.build_arch }}-Asserts-compilers
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
if: matrix.os != 'Android' || inputs.build_android
with:
name: Windows-${{ inputs.build_arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/download-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: Windows-${{ inputs.build_arch }}-macros
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-corelibs-libdispatch
ref: ${{ inputs.swift_corelibs_libdispatch_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-corelibs-foundation
ref: ${{ inputs.swift_corelibs_foundation_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-foundation
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-foundation
ref: ${{ inputs.swift_foundation_revision }}
path: ${{ github.workspace }}/SourceCache/swift-foundation
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-foundation-icu
ref: ${{ inputs.swift_foundation_icu_revision }}
path: ${{ github.workspace }}/SourceCache/swift-foundation-icu
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: apple/swift-collections
ref: ${{ inputs.swift_collections_revision }}
path: ${{ github.workspace }}/SourceCache/swift-collections
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift-corelibs-xctest
ref: ${{ inputs.swift_corelibs_xctest_revision }}
path: ${{ github.workspace }}/SourceCache/swift-corelibs-xctest
show-progress: false
- uses: actions/[email protected]
if: matrix.os != 'Android' || inputs.build_android
with:
repository: swiftlang/swift-testing
ref: ${{ inputs.swift_testing_revision }}
path: ${{ github.workspace }}/SourceCache/swift-testing
show-progress: false
- name: Setup environment
if: matrix.os != 'Android' || inputs.build_android
run: |
$RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$SDKRoot = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk
echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# FIXME(compnerd): workaround CMake 3.30+ issue
- uses: lukka/get-cmake@aa1df13cce8c30d2cb58efa871271c5a764623f8 # main
if: matrix.os != 'Android' || inputs.build_android
with:
cmakeVersion: 3.29.9
- uses: nttld/setup-ndk@v1
if: matrix.os == 'Android' && inputs.build_android
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Configure libdispatch
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: libdispatch
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
bin-dir: ${{ github.workspace }}/BinaryCache/libdispatch
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "CXX", "Swift")'
cmake-defines: |
@{
'ENABLE_SWIFT' = "YES";
}
- name: Build libdispatch
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch
- name: Configure Foundation
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: Foundation
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-corelibs-foundation
bin-dir: ${{ github.workspace }}/BinaryCache/foundation
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'FOUNDATION_BUILD_TOOLS' = if ("${{ matrix.os }}" -eq 'Windows') { "YES" } else { "NO" };
'CURL_DIR' = "${{ github.workspace }}/BuildRoot/Library/curl-${{ inputs.curl_version }}/usr/lib/cmake/CURL";
'LibXml2_DIR' = "${{ github.workspace }}/BuildRoot/Library/libxml2-${{ inputs.libxml2_version }}/usr/lib/cmake/libxml2-${{ inputs.libxml2_version }}";
'ZLIB_LIBRARY' = if ("${{ matrix.os }}" -eq "Windows") {
"${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr/lib/zlibstatic.lib"
} else {
"${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr/lib/libz.a"
};
'ZLIB_INCLUDE_DIR' = "${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr/include";
'dispatch_DIR' = "${{ github.workspace }}/BinaryCache/libdispatch/cmake/modules";
'_SwiftFoundation_SourceDIR' = "${{ github.workspace }}/SourceCache/swift-foundation";
'_SwiftFoundationICU_SourceDIR' = "${{ github.workspace }}/SourceCache/swift-foundation-icu";
'_SwiftCollections_SourceDIR' = "${{ github.workspace }}/SourceCache/swift-collections";
'SwiftFoundation_MACRO' = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin";
}
- name: Build Foundation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/foundation
# TODO(compnerd) correctly version XCTest
- name: Configure XCTest
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: XCTest
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-corelibs-xctest
bin-dir: ${{ github.workspace }}/BinaryCache/xctest
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-${{ inputs.swift_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_INSTALL_BINDIR' = "${{ matrix.bindir }}";
'ENABLE_TESTING' = "NO";
'dispatch_DIR' = "${{ github.workspace }}/BinaryCache/libdispatch/cmake/modules";
'Foundation_DIR' = "${{ github.workspace }}/BinaryCache/foundation/cmake/modules";
'XCTest_INSTALL_NESTED_SUBDIR' = "YES";
}
- name: Build XCTest
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/xctest
- name: Configure Testing
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: Testing
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-testing
bin-dir: ${{ github.workspace }}/BinaryCache/testing
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-${{ inputs.swift_version }}/usr
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_INSTALL_BINDIR' = "${{ matrix.bindir }}";
'dispatch_DIR' = "${{ github.workspace }}/BinaryCache/libdispatch/cmake/modules";
'Foundation_DIR' = "${{ github.workspace }}/BinaryCache/foundation/cmake/modules";
'SwiftTesting_MACRO' = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/TestingMacros.dll";
'SwiftTesting_INSTALL_NESTED_SUBDIR' = "YES";
}
- name: Build Testing
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/testing
- name: Install Testing
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/testing --target install
- name: Install xctest
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/xctest --target install
- name: Install foundation
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/foundation --target install
- name: Install libdispatch
if: matrix.os != 'Android' || inputs.build_android
run: |
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch --target install
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
architecture: x64 # FIXME(#1004): Remove workaround installing x64 Python on ARM64 CI hosts
- uses: jannekem/run-python-script-action@v1
if: matrix.os != 'Android' || inputs.build_android
with:
script: |
import os
import plistlib
info_plist = r'${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Info.plist'
with open(os.path.normpath(info_plist), 'wb') as plist:
# TODO(compnerd) derive this from the install directory
plistlib.dump({ 'DefaultProperties': { 'XCTEST_VERSION': '${{ inputs.swift_version }}', 'TESTING_VERSION': '${{ inputs.swift_version }}', 'SWIFTC_FLAGS': ['-use-ld=lld'] } }, plist)
sdk_settings_plist = r'${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/SDKSettings.plist'
with open(os.path.normpath(sdk_settings_plist), 'wb') as plist:
# TODO(compnerd) derive this from the CMAKE_BUILD_TYPE for the
# runtime.
plistlib.dump({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }, plist)
- name: Create SDKSettings.json
if: matrix.os != 'Android' || inputs.build_android
run: |
$SDKSettings = @{
CanonicalName = "${{ matrix.triple }}"
DisplayName = "${{ matrix.os }}"
IsBaseSDK = "NO"
Version = "${{ inputs.swift_version }}"
VersionMap = @{}
DefaultProperties = @{
PLATFORM_NAME = "${{ matrix.os }}"
DEFAULT_COMPILER = [string]::Format(".org.compnerd.dt.toolchain.{0}.{1}-asserts", (Get-Date -Format "yyyymmdd"), ((Get-Date).Hour % 6))
}
}
if ("${{ matrix.os }}" -eq "Windows") {
$SDKSettings.DefaultProperties.DEFAULT_USE_RUNTIME = "MD"
}
New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk" -Force | Out-Null
$SDKSettings | ConvertTo-JSON | Out-File -FilePath "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/SDKSettings.json"
- uses: actions/upload-artifact@v4
if: matrix.os != 'Android' || inputs.build_android
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform
- name: Upload PDBs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.pdb'
- name: Upload DLLs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info && matrix.os == 'Windows' }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.dll'
devtools:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
needs: [sqlite, compilers, stdlib, sdk]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
name: Windows ${{ matrix.arch }} Developer Tools
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-devtools
# FIXME(compnerd): workaround CMake 3.30+ issue
- uses: lukka/get-cmake@aa1df13cce8c30d2cb58efa871271c5a764623f8 # main
with:
cmakeVersion: 3.29.9
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-sqlite-${{ inputs.swift_toolchain_sqlite_version }}
path: ${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr
- name: Download Compilers
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ inputs.build_arch }}-Asserts-compilers
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-sdk
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-${{ inputs.build_arch }}-macros
path: ${{ github.workspace }}/BinaryCache/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-Asserts-swift-syntax
path: ${{ github.workspace }}/BinaryCache/swift-syntax
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-cmark-gfm-${{ inputs.swift_cmark_version }}
path: ${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr
- uses: actions/[email protected]
with:
repository: swiftlang/indexstore-db
ref: ${{ inputs.indexstore_db_revision }}
path: ${{ github.workspace }}/SourceCache/indexstore-db
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/sourcekit-lsp
ref: ${{ inputs.sourcekit_lsp_revision }}
path: ${{ github.workspace }}/SourceCache/sourcekit-lsp
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-argument-parser
ref: ${{ inputs.swift_argument_parser_revision }}
path: ${{ github.workspace }}/SourceCache/swift-argument-parser
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-asn1
ref: ${{ inputs.swift_asn1_revision }}
path: ${{ github.workspace }}/SourceCache/swift-asn1
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-certificates
ref: ${{ inputs.swift_certificates_revision }}
path: ${{ github.workspace }}/SourceCache/swift-certificates
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-collections
ref: ${{ inputs.swift_collections_revision }}
path: ${{ github.workspace }}/SourceCache/swift-collections
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-crypto
ref: ${{ inputs.swift_crypto_revision }}
path: ${{ github.workspace }}/SourceCache/swift-crypto
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-docc-render-artifact
ref: ${{ inputs.swift_docc_render_artifact_revision }}
path: ${{ github.workspace }}/SourceCache/swift-docc-render-artifact
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-docc
ref: ${{ inputs.swift_docc_revision }}
path: ${{ github.workspace }}/SourceCache/swift-docc
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-docc-symbolkit
ref: ${{ inputs.swift_docc_symbolkit_revision }}
path: ${{ github.workspace }}/SourceCache/swift-docc-symbolkit
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-driver
ref: ${{ inputs.swift_driver_revision }}
path: ${{ github.workspace }}/SourceCache/swift-driver
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-format
ref: ${{ inputs.swift_format_revision }}
path: ${{ github.workspace }}/SourceCache/swift-format
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-llbuild
ref: ${{ inputs.swift_llbuild_revision }}
path: ${{ github.workspace }}/SourceCache/swift-llbuild
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-lmdb
ref: ${{ inputs.swift_lmdb_revision }}
path: ${{ github.workspace }}/SourceCache/swift-lmdb
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-markdown
ref: ${{ inputs.swift_markdown_revision }}
path: ${{ github.workspace }}/SourceCache/swift-markdown
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-tools-protocols
ref: ${{ inputs.swift_tools_protocols_revision }}
path: ${{ github.workspace }}/SourceCache/swift-tools-protocols
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-build
ref: ${{ inputs.swift_build_revision }}
path: ${{ github.workspace }}/SourceCache/swift-build
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-package-manager
ref: ${{ inputs.swift_package_manager_revision }}
path: ${{ github.workspace }}/SourceCache/swift-package-manager
show-progress: false
- uses: actions/[email protected]
with:
repository: apple/swift-system
ref: ${{ inputs.swift_system_revision }}
path: ${{ github.workspace }}/SourceCache/swift-system
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-subprocess
ref: ${{ inputs.swift_subprocess_revision }}
path: ${{ github.workspace }}/SourceCache/swift-subprocess
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-tools-support-core
ref: ${{ inputs.swift_tools_support_core_revision }}
path: ${{ github.workspace }}/SourceCache/swift-tools-support-core
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- run: |
$RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$SDKRoot = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk
echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- run: |
Move-Item ${env:SDKROOT}/usr/lib/swift/dispatch ${env:SDKROOT}/usr/include/
Move-Item ${env:SDKROOT}/usr/lib/swift/os ${env:SDKROOT}/usr/include/
Move-Item ${env:SDKROOT}/usr/lib/swift/Block ${env:SDKROOT}/usr/include/
Move-Item ${env:SDKROOT}/usr/lib/swift/_foundation_unicode ${env:SDKROOT}/usr/include
Move-Item ${env:SDKROOT}/usr/lib/swift/_FoundationCShims ${env:SDKROOT}/usr/include
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/BlocksRuntime.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/dispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/swiftDispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/Foundation.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationXML.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationNetworking.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/_FoundationICU.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
# Download host libraries for the windows amd64 host, after moving the target libraries to the target-specific directory.
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ inputs.build_arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/download-artifact@v4
with:
name: Windows-${{ inputs.build_arch }}-sdk
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
- name: Configure swift-argument-parser
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-argument-parser
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-argument-parser
bin-dir: ${{ github.workspace }}/BinaryCache/swift-argument-parser
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'BUILD_TESTING' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-argument-parser
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-argument-parser
- name: Configure swift-collections
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-collections
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-collections
bin-dir: ${{ github.workspace }}/BinaryCache/swift-collections
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-collections
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-collections
- name: Configure swift-asn1
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-asn1
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-asn1
bin-dir: ${{ github.workspace }}/BinaryCache/swift-asn1
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-asn1
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-asn1
- name: Configure swift-crypto
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-crypto
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-crypto
bin-dir: ${{ github.workspace }}/BinaryCache/swift-crypto
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("ASM", "C", "CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftASN1_DIR' = "${{ github.workspace }}/BinaryCache/swift-asn1/cmake/modules";
}
- name: Build swift-crypto
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-crypto
- name: Configure swift-llbuild
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-llbuild
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-llbuild
bin-dir: ${{ github.workspace }}/BinaryCache/swift-llbuild
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'LLBUILD_SUPPORT_BINDINGS' = "Swift";
'SQLite3_INCLUDE_DIR' = "${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/include";
'SQLite3_LIBRARY' = "${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/lib/SQLite3.lib";
}
- name: Build swift-llbuild
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-llbuild
- name: Configure swift-system
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-system
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-system
bin-dir: ${{ github.workspace }}/BinaryCache/swift-system
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-system
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-system
- name: Configure swift-subprocess
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-subprocess
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-subprocess
bin-dir: ${{ github.workspace }}/BinaryCache/swift-subprocess
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-subprocess
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-subprocess
- name: Configure swift-tools-support-core
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-tools-support-core
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-tools-support-core
bin-dir: ${{ github.workspace }}/BinaryCache/swift-tools-support-core
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'Foundation_DIR' = "${{ github.workspace }}/BinaryCache/foundation/cmake/modules";
'XCTest_DIR' = "${{ github.workspace }}/BinaryCache/xctest/cmake/modules";
}
- name: Build swift-tools-support-core
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-tools-support-core
- name: Configure swift-driver
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-driver
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-driver
bin-dir: ${{ github.workspace }}/BinaryCache/swift-driver
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'TSC_DIR'="${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules";
'LLBuild_DIR'="${{ github.workspace }}/BinaryCache/swift-llbuild/cmake/modules";
'ArgumentParser_DIR'="${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'SQLite3_INCLUDE_DIR'="${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/include";
'SQLite3_LIBRARY'="${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/lib/SQLite3.lib";
'SWIFT_DRIVER_BUILD_TOOLS' = "NO";
}
- name: Build swift-driver
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-driver
- name: Configure swift-certificates
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-certificates
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-certificates
bin-dir: ${{ github.workspace }}/BinaryCache/swift-certificates
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftCrypto_DIR'="${{ github.workspace }}/BinaryCache/swift-crypto/cmake/modules";
'SwiftASN1_DIR'="${{ github.workspace }}/BinaryCache/swift-asn1/cmake/modules";
}
- name: Build swift-certificates
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-certificates
- name: Configure swift-tools-protocols
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-tools-protocols
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-tools-protocols
bin-dir: ${{ github.workspace }}/BinaryCache/swift-tools-protocols
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-tools-protocols
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-tools-protocols
- name: Configure swift-build
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-build
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-build
bin-dir: ${{ github.workspace }}/BinaryCache/swift-build
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'LLBuild_DIR' = "${{ github.workspace }}/BinaryCache/swift-llbuild/cmake/modules";
'SwiftDriver_DIR' = "${{ github.workspace }}/BinaryCache/swift-driver/cmake/modules";
'SwiftSystem_DIR' = "${{ github.workspace }}/BinaryCache/swift-system/cmake/modules";
'TSC_DIR' = "${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules";
'SQLite3_INCLUDE_DIR' = "${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/include";
'SQLite3_LIBRARY' = "${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/lib/SQLite3.lib";
'CMAKE_Swift_FLAGS' = "${{ matrix.arch == 'arm64' && '-use-ld=lld-link' || '' }}";
'SwiftToolsProtocols_DIR' = "${{ github.workspace }}/BinaryCache/swift-tools-protocols/cmake/modules";
}
- name: Build swift-build
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-build
- name: extract swift-syntax
run: |
$module = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules/SwiftSyntaxConfig.cmake"
$bindir = cygpath -m ${{ github.workspace }}/BinaryCache/swift-syntax
(Get-Content $module).Replace('<BINARY_DIR>', "${bindir}") | Set-Content $module
- name: Configure swift-package-manager
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-package-manager
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-package-manager
bin-dir: ${{ github.workspace }}/BinaryCache/swift-package-manager
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_Swift_FLAGS' = @("-DCRYPTO_v2");
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftSystem_DIR' = "${{ github.workspace }}/BinaryCache/swift-system/cmake/modules";
'TSC_DIR' = "${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules";
'LLBuild_DIR' = "${{ github.workspace }}/BinaryCache/swift-llbuild/cmake/modules";
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'SwiftDriver_DIR' = "${{ github.workspace }}/BinaryCache/swift-driver/cmake/modules";
'SwiftBuild_DIR' = "${{ github.workspace }}/BinaryCache/swift-build/cmake/modules";
'SwiftCrypto_DIR' = "${{ github.workspace }}/BinaryCache/swift-crypto/cmake/modules";
'SwiftCollections_DIR' = "${{ github.workspace }}/BinaryCache/swift-collections/cmake/modules";
'SwiftASN1_DIR' = "${{ github.workspace }}/BinaryCache/swift-asn1/cmake/modules";
'SwiftCertificates_DIR' = "${{ github.workspace }}/BinaryCache/swift-certificates/cmake/modules";
'SwiftSyntax_DIR' = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules"
'SQLite3_INCLUDE_DIR' = "${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/include";
'SQLite3_LIBRARY' = "${{ github.workspace }}/BinaryCache/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr/lib/SQLite3.lib";
'SwiftToolsProtocols_DIR' = "${{ github.workspace }}/BinaryCache/swift-tools-protocols/cmake/modules";
}
- name: Build swift-package-manager
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-package-manager
- name: Configure Markdown
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-markdown
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-markdown
bin-dir: ${{ github.workspace }}/BinaryCache/swift-markdown
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'cmark-gfm_DIR' = "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/cmake";
}
- name: Build Markdown
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-markdown
- name: Configure swift-format
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-format
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-format
bin-dir: ${{ github.workspace }}/BinaryCache/swift-format
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C")' }}
built-compilers: '@("Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'SwiftMarkdown_DIR' = "${{ github.workspace }}/BinaryCache/swift-markdown/cmake/modules";
'SwiftSyntax_DIR' = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules";
'cmark-gfm_DIR' = "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/cmake";
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build swift-format
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-format
- name: Configure swift-lmdb
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-lmdb
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-lmdb
bin-dir: ${{ github.workspace }}/BinaryCache/swift-lmdb
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
msvc-compilers: ${{ inputs.use_host_toolchain && '@("C")' || '@()' }}
pinned-compilers: ${{ inputs.use_host_toolchain && '@()' || '@("C")' }}
cmake-defines: |
@{
'CMAKE_C_FLAGS' = "${{ !inputs.use_host_toolchain && '-fuse-ld=lld' || '' }}";
}
- name: Build swift-lmdb
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-lmdb
- name: Configure indexstore-db
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: indexstore-db
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/indexstore-db
bin-dir: ${{ github.workspace }}/BinaryCache/indexstore-db
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "CXX", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'CMAKE_C_FLAGS' = @(
"-I${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/include",
"-I${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/include/Block");
'CMAKE_CXX_FLAGS' = @(
"-I${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/include",
"-I${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/include/Block");
'LMDB_DIR' = "${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules";
}
- name: Build indexstore-db
run: cmake --build ${{ github.workspace }}/BinaryCache/indexstore-db
- name: Configure sourcekit-lsp
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: sourcekit-lsp
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/sourcekit-lsp
bin-dir: ${{ github.workspace }}/BinaryCache/sourcekit-lsp
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'SwiftSyntax_DIR' = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules";
'TSC_DIR' = "${{ github.workspace }}/BinaryCache/swift-tools-support-core/cmake/modules";
'LLBuild_DIR' = "${{ github.workspace }}/BinaryCache/swift-llbuild/cmake/modules";
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'SwiftASN1_DIR' = "${{ github.workspace }}/BinaryCache/swift-asn1/cmake/modules";
'SwiftCrypto_DIR' = "${{ github.workspace }}/BinaryCache/swift-crypto/cmake/modules";
'SwiftCollections_DIR' = "${{ github.workspace }}/BinaryCache/swift-collections/cmake/modules";
'SwiftBuild_DIR' = "${{ github.workspace }}/BinaryCache/swift-build/cmake/modules";
'SwiftPM_DIR' = "${{ github.workspace }}/BinaryCache/swift-package-manager/cmake/modules";
'LMDB_DIR' = "${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules";
'IndexStoreDB_DIR' = "${{ github.workspace }}/BinaryCache/indexstore-db/cmake/modules";
}
- name: Build sourcekit-lsp
run: cmake --build ${{ github.workspace }}/BinaryCache/sourcekit-lsp
- name: Configure swift-docc-symbolkit
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-docc-symbolkit
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-docc-symbolkit
bin-dir: ${{ github.workspace }}/BinaryCache/swift-docc-symbolkit
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ input.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "NO";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
}
- name: Build swift-docc-symbolkit
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-docc-symbolkit
- name: Configure swift-docc
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-docc
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift-docc
bin-dir: ${{ github.workspace }}/BinaryCache/swift-docc
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ input.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("C", "Swift")'
cmake-defines: |
@{
'BUILD_SHARED_LIBS' = "YES";
'CMAKE_STATIC_LIBRARY_PREFIX_Swift' = "lib";
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
'SwiftASN1_DIR' = "${{ github.workspace }}/BinaryCache/swift-asn1/cmake/modules";
'SwiftCrypto_DIR' = "${{ github.workspace }}/BinaryCache/swift-crypto/cmake/modules";
'SwiftMarkdown_DIR' = "${{ github.workspace }}/BinaryCache/swift-markdown/cmake/modules";
'LMDB_DIR' = "${{ github.workspace }}/BinaryCache/swift-lmdb/cmake/modules";
'IndexStoreDB_DIR' = "${{ github.workspace }}/BinaryCache/indexstore-db/cmake/modules";
'SymbolKit_DIR' = "${{ github.workspace }}/BinaryCache/swift-docc-symbolkit/cmake/modules";
'cmark-gfm_DIR' = "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/cmake";
}
- name: Build swift-docc
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-docc
- name: Install swift-argument-parser
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-argument-parser --target install
- name: Install swift-collections
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-collections --target install
- name: Install swift-llbuild
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-llbuild --target install
- name: Install swift-system
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-system --target install
- name: Install swift-tools-support-core
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-tools-support-core --target install
- name: Install swift-driver
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-driver --target install
- name: Install swift-tools-protocols
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-tools-protocols --target install
- name: Install swift-build
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-build --target install
- name: Install swift-subprocess
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-subprocess --target install
- name: Install swift-package-manager
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-package-manager --target install
- name: Install SourceKit-LSP
run: cmake --build ${{ github.workspace }}/BinaryCache/sourcekit-lsp --target install
- name: Install swift-format
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-format --target install
- name: Install swift-docc
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-docc --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-devtools
path: ${{ github.workspace }}/BuildRoot/Library
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-swift-argument-parser
path: ${{ github.workspace }}/BinaryCache/swift-argument-parser
- name: Upload PDBs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.pdb'
- name: Upload DLLs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.dll'
- name: Upload EXEs to Azure
uses: microsoft/[email protected]
if: ${{ inputs.debug_info }}
with:
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }}
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }}
symbolsFolder: ${{ github.workspace }}/BinaryCache
searchPattern: '**/*.exe'
debugging_tools:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
needs: [compilers, devtools, stdlib, sdk]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
name: Windows ${{ matrix.arch }} Debugging Tools
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- name: Compute workspace hash
id: workspace_hash
run: |
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write("${{ github.workspace }}")
$writer.Flush()
$stringAsStream.Position = 0
$hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
echo "hash=$hash" >> $env:GITHUB_OUTPUT
- name: Setup sccache
uses: ./SourceCache/ci-build/.github/actions/setup-sccache
with:
s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }}
aws-region: ${{ vars.SCCACHE_AWS_REGION }}
aws-arn: ${{ vars.SCCACHE_AWS_ARN }}
disk-max-size: 100M
disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-debugging-tools
- name: Download swift-argument-parser
uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-swift-argument-parser
path: ${{ github.workspace }}/BinaryCache/swift-argument-parser
- name: Download Compilers
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ inputs.build_arch }}-Asserts-compilers
path: ${{ github.workspace }}/BinaryCache/Library
- name: Download stdlib
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- name: Download SDK
uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-sdk
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
- uses: actions/[email protected]
with:
repository: swiftlang/swift
ref: ${{ inputs.swift_revision }}
path: ${{ github.workspace }}/SourceCache/swift
show-progress: false
- run: |
$RTLPath = cygpath -w "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin"
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$SDKRoot = cygpath -w "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk"
echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- run: |
Move-Item ${env:SDKROOT}/usr/lib/swift/dispatch ${env:SDKROOT}/usr/include/
Move-Item ${env:SDKROOT}/usr/lib/swift/os ${env:SDKROOT}/usr/include/
Move-Item ${env:SDKROOT}/usr/lib/swift/Block ${env:SDKROOT}/usr/include/
Move-Item ${env:SDKROOT}/usr/lib/swift/_foundation_unicode ${env:SDKROOT}/usr/include
Move-Item ${env:SDKROOT}/usr/lib/swift/_FoundationCShims ${env:SDKROOT}/usr/include
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/BlocksRuntime.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/dispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/swiftDispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/Foundation.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationXML.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationNetworking.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/_FoundationICU.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
# Download host SDK on top of the target SDK, so that the runtime DLLs are the host ones.
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ inputs.build_arch }}-stdlib
path: ${{ github.workspace }}/BinaryCache/Library
- uses: actions/download-artifact@v4
with:
name: Windows-${{ inputs.build_arch }}-sdk
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
- name: Configure swift-inspect
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
with:
project-name: swift-inspect
swift-version: ${{ inputs.swift_version }}
enable-caching: true
debug-info: ${{ inputs.debug_info }}
build-os: ${{ inputs.build_os }}
build-arch: ${{ inputs.build_arch }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
src-dir: ${{ github.workspace }}/SourceCache/swift/tools/swift-inspect
bin-dir: ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
swift-sdk-path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
built-compilers: '@("Swift")'
cmake-defines: |
@{
'CMAKE_Swift_FLAGS' = @(
"-Xcc",
"-I${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/include/swift/SwiftRemoteMirror");
'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
}
- name: Build swift-inspect
run: cmake --build ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect
- name: Install swift-inspect
run: cmake --build ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect --target install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-debugging_tools
path: ${{ github.workspace }}/BuildRoot/Library
# Determines whether we're using trusted signing in this repository. If so and we're signing, downloads the trusted signing DLL to reduce boilerplate in steps that use it.
# Setting an output is necessary because the `env` and `secrets` contexts are not always available in `if` clauses.
configure_signing:
if: inputs.build_os == 'Windows'
name: Configure signing
runs-on: ${{ inputs.default_build_runner }}
outputs:
uses_trusted_signing: ${{ steps.test_trusted_signing.outputs.uses_trusted_signing }}
steps:
- name: Test whether we're using trusted signing
id: test_trusted_signing
run: |
"uses_trusted_signing=${{ secrets.TRUSTED_SIGNING_ACCOUNT != ''}}" | Out-File -FilePath ${env:GITHUB_OUTPUT} -Encoding utf8 -Append
- uses: nuget/setup-nuget@v2
if: inputs.signed && steps.test_trusted_signing.outputs.uses_trusted_signing == 'true'
- run: |
nuget install -x -OutputDirectory ${{ github.workspace }} Microsoft.Trusted.Signing.Client
if: inputs.signed && steps.test_trusted_signing.outputs.uses_trusted_signing == 'true'
- uses: actions/upload-artifact@v4
if: inputs.signed && steps.test_trusted_signing.outputs.uses_trusted_signing == 'true'
with:
name: trusted-signing-dll
# We're unconditionally using x64 because there's no arm64 version of the DLL as of Oct 2025.
# TODO: Update with more info once we've filed a bug against Microsoft.
path: ${{ github.workspace }}/Microsoft.Trusted.Signing.Client/bin/x64
package_tools:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
name: Package Tools
needs: [compilers, macros, debugging_tools, devtools, stdlib, sdk, configure_signing]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- name: Download Debugging Tools
uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-debugging_tools
path: ${{ github.workspace }}/BuildRoot/Library
- name: Download Compilers (Asserts)
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-Asserts-compilers
path: ${{ github.workspace }}/BuildRoot/Library
- name: Download Compilers (NoAsserts)
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-NoAsserts-compilers
path: ${{ github.workspace }}/BuildRoot/Library
- name: Download Developer Tools
uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-devtools
path: ${{ github.workspace }}/BuildRoot/Library
- name: Download Macros
uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-macros
path: ${{ github.workspace }}/BuildRoot/Library
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-${{ matrix.arch }}-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-shared-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/[email protected]
with:
repository: swiftlang/swift-installer-scripts
ref: ${{ inputs.swift_installer_scripts_revision }}
path: ${{ github.workspace }}/SourceCache/swift-installer-scripts
show-progress: false
- run: |
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/" -ItemType Directory -Force | Out-Null
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/" -ItemType Directory -Force | Out-Null
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/${{ matrix.cpu }}/
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/usr" -ItemType Directory -Force | Out-Null
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/usr"
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/usr"
- run: |
$CertificatePath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.b64
$PFXPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.pfx
Set-Content -Path $CertificatePath -Value '${{ secrets.CERTIFICATE }}'
certutil.exe -decode $CertificatePath $PFXPath
Write-Output CERTIFICATE=$PFXPath | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'false'
- name: Install WixToolset.Sdk
run: |
if ((Get-Package -Name WixToolset.Sdk -ErrorAction SilentlyContinue) -eq $null) {
Install-Package -Name WixToolset.Sdk -RequiredVersion 4.0.1 -Force
}
- run: |
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/dispatch ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/os ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/Block ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/_foundation_unicode ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/_FoundationCShims ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/dispatch ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/os ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/Block ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/_foundation_unicode ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/_FoundationCShims ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
- run: |
$CertificatePath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.b64
$PFXPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.pfx
Set-Content -Path $CertificatePath -Value '${{ secrets.CERTIFICATE }}'
certutil -decode $CertificatePath $PFXPath
Echo CERTIFICATE=$PFXPath | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'false'
- name: Install WixToolset.Sdk
run: |
if ((Get-Package -Name WixToolset.Sdk -ErrorAction SilentlyContinue) -eq $null) {
Install-Package -Name WixToolset.Sdk -RequiredVersion 4.0.1 -Force
}
- name: Complete NoAsserts layout
run: |
$AssertToolchainRoot = "${{ github.workspace }}\BuildRoot\Library\Developer\Toolchains\${{ inputs.swift_version }}+Asserts"
$NoAssertToolchainRoot = "${{ github.workspace }}\BuildRoot\Library\Developer\Toolchains\${{ inputs.swift_version }}+NoAsserts"
# Only compilers have NoAsserts enabled. Copy the rest of the Toolcahin binaries from the Asserts output
# Use robocopy for efficient copying
# /E : Copies subdirectories, including empty ones.
# /XC: Excludes existing files with the same timestamp but different file sizes.
# /XN: Excludes existing files that are newer than the copy in the source directory.
# /XO: Excludes existing files that are older than the copy in the source directory.
# /NFL: Do not list coppied files in output
# /NDL: Do not list directories in output
# /NJH: Do not write a job header
# /NC: Do not write file classes
# /NS: Do not write file sizes
# /NP: Do not show progress indicator
# Exit code documentationn for robocopy: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy#exit-return-codes
$exitCode = &robocopy $AssertToolchainRoot $NoAssertToolchainRoot /E /XC /XN /XO /NS /NC /NFL /NDL /NJH
if ($LastExitCode -gt 8) {
Write-Error "robocopy failed with exit code $LastExitCode"
exit $LastExitCode
}
exit 0
- uses: actions/[email protected]
with:
repository: microsoft/mimalloc
ref: ${{ inputs.mimalloc_revision }}
path: ${{ github.workspace }}/SourceCache/mimalloc
- name: Build and apply mimalloc
run: |
$HostMSArch = if ("${{ matrix.arch }}" -eq "arm64") { "arm64" } else { "x64" }
$HostSuffix = if ("${{ matrix.arch }}" -eq "arm64") { "-arm64" } else { "" }
$BuildSuffix = if ("${{ inputs.build_arch }}" -eq "arm64") { "-arm64" } else { "" }
# Reference: https://github.com/microsoft/mimalloc/tree/dev/bin#minject
msbuild ${{ github.workspace }}\SourceCache\mimalloc\ide\vs2022\mimalloc.sln -p:Configuration=Release -p:Platform=$HostMSArch
$AssertToolchainBin = "${{ github.workspace }}\BuildRoot\Library\Developer\Toolchains\${{ inputs.swift_version }}+Asserts\usr\bin"
$NoAssertToolchainBin = "${{ github.workspace }}\BuildRoot\Library\Developer\Toolchains\${{ inputs.swift_version }}+NoAsserts\usr\bin"
Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-$HostMSArch\Release\mimalloc.dll" `
-Destination "$AssertToolchainBin"
Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-$HostMSArch\Release\mimalloc.dll" `
-Destination "$NoAssertToolchainBin"
Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-$HostMSArch\Release\mimalloc-redirect$HostSuffix.dll" `
-Destination "$AssertToolchainBin"
Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-$HostMSArch\Release\mimalloc-redirect$HostSuffix.dll" `
-Destination "$NoAssertToolchainBin"
$MimallocExecutables = @("swift.exe",
"swiftc.exe",
"swift-driver.exe",
"swift-frontend.exe",
"clang.exe",
"clang++.exe",
"clang-cl.exe",
"lld.exe",
"lld-link.exe",
"ld.lld.exe",
"ld64.lld.exe")
$AssertBinaries = $MimallocExecutables | ForEach-Object { [IO.Path]::Combine($AssertToolchainBin, $_) }
$NoAssertBinaries = $MimallocExecutables | ForEach-Object { [IO.Path]::Combine($NoAssertToolchainBin, $_) }
$Binaries = $AssertBinaries + $NoAssertBinaries
foreach ($Exe in $Binaries) {
# Binary-patch in place
& "${{ github.workspace }}\SourceCache\mimalloc\bin\minject$BuildSuffix" -f -i -v "$Exe"
# Log the import table
& "${{ github.workspace }}\SourceCache\mimalloc\bin\minject$BuildSuffix" -l "$Exe"
}
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_SP_CREDENTIALS }}
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
- uses: actions/download-artifact@v4
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
with:
name: trusted-signing-dll
path: ${{ runner.temp }}/trusted-signing-dll
- name: Prepare trusted signing arguments
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
run: |
# We're unconditionally using x64 because there's no arm64 version of the DLL as of Oct 2025.
# TODO: Update with more info once we've filed a bug against Microsoft.
$signtoolPath = Join-Path -Path ${env:WindowsSdkVerBinPath} -ChildPath "x64/"
echo "SIGNTOOL_PATH=$signtoolPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$trustedSigningDllPath = Join-Path -Path ${env:RUNNER_TEMP}/trusted-signing-dll -ChildPath "Azure.CodeSigning.Dlib.dll"
echo "TRUSTED_SIGNING_DLL_PATH=$trustedSigningDllPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$metadataPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath "metadata.json"
'{
"Endpoint": "https://eus.codesigning.azure.net",
"CodeSigningAccountName": "${{ secrets.TRUSTED_SIGNING_ACCOUNT }}",
"CertificateProfileName": "${{ secrets.TRUSTED_SIGNING_PROD_PROFILE }}",
"ExcludeCredentials": [
"ManagedIdentityCredential",
"WorkloadIdentityCredential",
"SharedTokenCacheCredential",
"VisualStudioCredential",
"VisualStudioCodeCredential",
"EnvironmentCredential",
"AzurePowerShellCredential",
"AzureDeveloperCliCredential",
"InteractiveBrowserCredential"
]
}' | Out-File -FilePath $metadataPath -Encoding utf8
echo "TRUSTED_SIGNING_METADATA_PATH=$metadataPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
- name: Package Build Tools (Asserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:WORKAROUND_MIMALLOC_ISSUE_997=false `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/bld/asserts/bld.asserts.wixproj
- name: Package Build Tools (NoAsserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:WORKAROUND_MIMALLOC_ISSUE_997=false `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/bld/noasserts/bld.noasserts.wixproj
- name: Package CLI Tools (Asserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/cli/asserts/cli.asserts.wixproj
- name: Package CLI Tools (NoAsserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/cli/noasserts/cli.noasserts.wixproj
- name: Package Debugging Tools (Asserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/dbg/asserts/dbg.asserts.wixproj
- name: Package Debugging Tools (NoAsserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/dbg/noasserts/dbg.noasserts.wixproj
- name: Package IDE Tools (Asserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/ide/asserts/ide.asserts.wixproj
- name: Package IDE Tools (NoAsserts)
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/ide/noasserts/ide.noasserts.wixproj
- name: Package Legacy Runtime
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
-p:WindowsRuntimeARM64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/" `
-p:WindowsRuntimeX64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/" `
-p:WindowsRuntimeX86="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/" `
-p:VCRedistDir="$([IO.Path]::Combine(${env:VCToolsRedistDir}, "${{ matrix.arch == 'amd64' && 'x64' || 'arm64' }}", "Microsoft.VC143.CRT"))" `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/rtl/legacy/msi/rtlmsi.wixproj
- name: Package Experimental Shared Runtime
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ matrix.arch }} `
-p:WindowsExperimentalRuntimeARM64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/" `
-p:WindowsExperimentalRuntimeX64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/" `
-p:WindowsExperimentalRuntimeX86="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/" `
-p:VCRedistDir="$([IO.Path]::Combine(${env:VCToolsRedistDir}, "${{ matrix.arch == 'amd64' && 'x64' || 'arm64' }}", "Microsoft.VC143.CRT"))" `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/rtl/shared/msi/rtl.shared.msi.wixproj
- if: ${{ inputs.release }}
uses: actions/attest-build-provenance@v2
with:
subject-path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.asserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.noasserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.asserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.noasserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.asserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.noasserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.asserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.noasserts.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.${{ matrix.arch }}.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.${{ matrix.arch }}.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-bld-asserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.asserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-bld-noasserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/bld.noasserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-cli-asserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.asserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-cli-noasserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/cli.noasserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-dbg-asserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.asserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-dbg-noasserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/dbg.noasserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-ide-asserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.asserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.asserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-ide-noasserts-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.noasserts.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/ide.noasserts.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-rtl-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-rtl-shared-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.${{ matrix.arch }}.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/rtl.${{ matrix.arch }}.cab
package_windows_platform:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
name: Package Windows SDK & Runtime
needs: [stdlib, sdk, experimental-sdk, configure_signing]
runs-on: ${{ inputs.default_build_runner }}
outputs:
expected-dlls-amd64: ${{ steps.write-expectations.outputs.expected-dlls-amd64 }}
expected-dlls-arm64: ${{ steps.write-expectations.outputs.expected-dlls-arm64 }}
expected-dlls-x86: ${{ steps.write-expectations.outputs.expected-dlls-x86 }}
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-amd64-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-shared-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BuildRoot/Library/libxml2
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-curl-${{ inputs.curl_version }}
path: ${{ github.workspace }}/BuildRoot/Library/curl
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli/
- run: |
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/" -ItemType Directory -Force | Out-Null
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/" -ItemType Directory -Force | Out-Null
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/" -ItemType Directory -Force | Out-Null
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libswiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/libxml2/lib/libxml2s.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/curl/lib/libcurl.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/zlib/lib/zlibstatic.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/brotli/lib/brotlicommon.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/brotli/lib/brotlidec.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_CFURLSessionInterface.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_CFXMLInterface.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_FoundationCShims.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/CoreFoundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/lib_FoundationCollections.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-x86_64/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-x86_64/usr"
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-x86_64/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-x86_64/usr"
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-arm64-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-shared-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BuildRoot/Library/libxml2
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-curl-${{ inputs.curl_version }}
path: ${{ github.workspace }}/BuildRoot/Library/curl
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli
- run: |
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/" -ItemType Directory -Force
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/" -ItemType Directory -Force
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/" -ItemType Directory -Force
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libswiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/libxml2/lib/libxml2s.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/curl/lib/libcurl.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/zlib/lib/zlibstatic.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/brotli/lib/brotlidec.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/brotli/lib/brotlicommon.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_CFURLSessionInterface.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_CFXMLInterface.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_FoundationCShims.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/CoreFoundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/lib_FoundationCollections.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/aarch64/
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-aarch64/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-aarch64/usr"
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-aarch64/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-aarch64/usr"
- uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Windows-x86-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- uses: actions/download-artifact@v4
with:
name: Windows-x86-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-x86-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-x86-shared-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- uses: actions/download-artifact@v4
with:
name: Windows-x86-libxml2-${{ inputs.libxml2_version }}
path: ${{ github.workspace }}/BuildRoot/Library/libxml2
- uses: actions/download-artifact@v4
with:
name: Windows-x86-curl-${{ inputs.curl_version }}
path: ${{ github.workspace }}/BuildRoot/Library/curl
- uses: actions/download-artifact@v4
with:
name: Windows-x86-zlib-${{ inputs.zlib_version }}
path: ${{ github.workspace }}/BuildRoot/Library/zlib
- uses: actions/download-artifact@v4
with:
name: Windows-x86-brotli-${{ inputs.brotli_version }}
path: ${{ github.workspace }}/BuildRoot/Library/brotli
- run: |
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/" -ItemType Directory -Force
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/" -ItemType Directory -Force
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/" -ItemType Directory -Force
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/swiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/BlocksRuntime.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/dispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libswiftDispatch.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/libxml2/lib/libxml2s.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/curl/lib/libcurl.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/zlib/lib/zlibstatic.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/brotli/lib/brotlidec.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/brotli/lib/brotlicommon.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/Foundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/FoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_CFURLSessionInterface.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_CFXMLInterface.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_FoundationCShims.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_FoundationICU.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/CoreFoundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/lib_FoundationCollections.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundation.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationEssentials.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationInternationalization.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationNetworking.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/libFoundationXML.lib ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/i686/
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-i686/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-i686/usr"
New-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-i686/usr" -ItemType Directory -Force | Out-Null
Move-Item "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/bin" "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-i686/usr"
- uses: actions/[email protected]
with:
repository: swiftlang/swift-installer-scripts
ref: ${{ inputs.swift_installer_scripts_revision }}
path: ${{ github.workspace }}/SourceCache/swift-installer-scripts
show-progress: false
- run: |
$CertificatePath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.b64
$PFXPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.pfx
Set-Content -Path $CertificatePath -Value '${{ secrets.CERTIFICATE }}'
certutil.exe -decode $CertificatePath $PFXPath
Write-Output CERTIFICATE=$PFXPath | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'false'
- name: Install WixToolset.Sdk
run: |
if ((Get-Package -Name WixToolset.Sdk -ErrorAction SilentlyContinue) -eq $null) {
Install-Package -Name WixToolset.Sdk -RequiredVersion 4.0.1 -Force
}
- run: |
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/dispatch ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/os ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/Block ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/_foundation_unicode ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/_FoundationCShims ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/dispatch ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/os ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/Block ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/_foundation_unicode ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/_FoundationCShims ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/include/
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_SP_CREDENTIALS }}
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
- uses: actions/download-artifact@v4
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
with:
name: trusted-signing-dll
path: ${{ runner.temp }}/trusted-signing-dll
- name: Prepare trusted signing arguments
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
run: |
# We're unconditionally using x64 because there's no arm64 version of the DLL as of Oct 2025.
# TODO: Update with more info once we've filed a bug against Microsoft.
$signtoolPath = Join-Path -Path ${env:WindowsSdkVerBinPath} -ChildPath "x64/"
echo "SIGNTOOL_PATH=$signtoolPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$trustedSigningDllPath = Join-Path -Path ${env:RUNNER_TEMP}/trusted-signing-dll -ChildPath "Azure.CodeSigning.Dlib.dll"
echo "TRUSTED_SIGNING_DLL_PATH=$trustedSigningDllPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$metadataPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath "metadata.json"
'{
"Endpoint": "https://eus.codesigning.azure.net",
"CodeSigningAccountName": "${{ secrets.TRUSTED_SIGNING_ACCOUNT }}",
"CertificateProfileName": "${{ secrets.TRUSTED_SIGNING_PROD_PROFILE }}",
"ExcludeCredentials": [
"ManagedIdentityCredential",
"WorkloadIdentityCredential",
"SharedTokenCacheCredential",
"VisualStudioCredential",
"VisualStudioCodeCredential",
"EnvironmentCredential",
"AzurePowerShellCredential",
"AzureDeveloperCliCredential",
"InteractiveBrowserCredential"
]
}' | Out-File -FilePath $metadataPath -Encoding utf8
echo "TRUSTED_SIGNING_METADATA_PATH=$metadataPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
- name: Package Platform
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ inputs.build_arch }} `
-p:WindowsArchitectures="`"aarch64;i686;x86_64`"" `
-p:WindowsRuntimeARM64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-aarch64" `
-p:WindowsRuntimeX64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-x86_64" `
-p:WindowsRuntimeX86="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes/Windows-i686" `
-p:WindowsExperimentalRuntimeARM64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-aarch64" `
-p:WindowsExperimentalRuntimeX64="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-x86_64" `
-p:WindowsExperimentalRuntimeX86="${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-i686" `
-p:IncludeLegacySDK=True `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/platforms/windows/windows.wixproj
- name: Write DLL Expectations
id: write-expectations
run: |
@(
@("amd64", "x86_64"),
@("arm64", "aarch64"),
@("x86", "i686")
) | ForEach-Object {
$arch, $suffix = $_
$runtimes = "${{ github.workspace }}/BuildRoot/Library/Developer/Runtimes.Experimental/Windows-$suffix/usr/bin"
Get-ChildItem -Path $runtimes -Filter *.dll -File |
# A flat list collapses down to a space-separated string, so we need to convert to JSON so we can read it later.
ForEach-Object Name | ConvertTo-Json -Compress | ForEach-Object { "expected-dlls-$arch=$_" } |
Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
}
- if: ${{ inputs.release }}
uses: actions/attest-build-provenance@v2
with:
subject-path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/windows.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/windows.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/windows.experimental.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.arm64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.experimental.arm64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.x64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.experimental.x64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.x86.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.experimental.x86.cab
${{ github.workspace }}/BinaryCache/installer/Release/amd64/rtl.amd64.msm
${{ github.workspace }}/BinaryCache/installer/Release/amd64/rtl.shared.amd64.msm
${{ github.workspace }}/BinaryCache/installer/Release/amd64/rtl.static.amd64.msm
${{ github.workspace }}/BinaryCache/installer/Release/arm64/rtl.arm64.msm
${{ github.workspace }}/BinaryCache/installer/Release/arm64/rtl.shared.arm64.msm
${{ github.workspace }}/BinaryCache/installer/Release/arm64/rtl.static.arm64.msm
${{ github.workspace }}/BinaryCache/installer/Release/x86/rtl.x86.msm
${{ github.workspace }}/BinaryCache/installer/Release/x86/rtl.shared.x86.msm
${{ github.workspace }}/BinaryCache/installer/Release/x86/rtl.static.x86.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-platform-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/windows.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/windows.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/windows.experimental.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.arm64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.experimental.arm64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.x64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.experimental.x64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.x86.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.windows.experimental.x86.cab
- uses: actions/upload-artifact@v4
with:
name: Windows-amd64-rtl-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/amd64/rtl.amd64.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-amd64-rtl-shared-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/amd64/rtl.shared.amd64.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-amd64-rtl-static-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/amd64/rtl.static.amd64.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-arm64-rtl-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/arm64/rtl.arm64.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-arm64-rtl-shared-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/arm64/rtl.shared.arm64.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-arm64-rtl-static-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/arm64/rtl.static.arm64.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-x86-rtl-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/x86/rtl.x86.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-x86-rtl-shared-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/x86/rtl.shared.x86.msm
- uses: actions/upload-artifact@v4
with:
name: Windows-x86-rtl-static-msm
path: |
${{ github.workspace }}/BinaryCache/installer/Release/x86/rtl.static.x86.msm
package_android_platform:
# TODO: Build this on macOS or make an equivalent Mac-only job
name: Package Android SDK & Runtime
needs: [stdlib, ds2, sdk, experimental-sdk, configure_signing]
runs-on: ${{ inputs.default_build_runner }}
steps:
- if: inputs.build_android
uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- if: inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
- if: inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Android-arm64-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-arm64-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-arm64-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-arm64-ds2
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/Library
- if: inputs.build_android
run: |
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.so" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/aarch64/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/aarch64/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/aarch64/
- if: inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Android-armv7-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-armv7-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-armv7-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-armv7-ds2
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/Library
- if: inputs.build_android
run: |
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.so" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/armv7/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/armv7/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/armv7/
- if: inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Android-x86_64-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-x86_64-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-x86_64-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-x86_64-ds2
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/Library
- if: inputs.build_android
run: |
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.so" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/x86_64/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/x86_64/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/x86_64/
- if: inputs.build_android
uses: thebrowsercompany/gha-download-tar-artifact@59992d91335d4ecba543c8535f7d07238e42125d # main
with:
name: Android-i686-stdlib
path: ${{ github.workspace }}/BuildRoot/Library
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-i686-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-i686-static-experimental-sdk
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform
- if: inputs.build_android
uses: actions/download-artifact@v4
with:
name: Android-i686-ds2
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/Library
- if: inputs.build_android
run: |
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.so" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/i686/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/android/i686/
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/lib*.a" -Destination ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/android/i686/
- if: inputs.build_android
uses: actions/[email protected]
with:
repository: swiftlang/swift-installer-scripts
ref: ${{ inputs.swift_installer_scripts_revision }}
path: ${{ github.workspace }}/SourceCache/swift-installer-scripts
show-progress: false
- if: inputs.build_android && inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'false'
run: |
$CertificatePath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.b64
$PFXPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.pfx
Set-Content -Path $CertificatePath -Value '${{ secrets.CERTIFICATE }}'
certutil.exe -decode $CertificatePath $PFXPath
Write-Output CERTIFICATE=$PFXPath | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
- if: inputs.build_android
name: Install WixToolset.Sdk
run: |
if ((Get-Package -Name WixToolset.Sdk -ErrorAction SilentlyContinue) -eq $null) {
Install-Package -Name WixToolset.Sdk -RequiredVersion 4.0.1 -Force
}
- if: inputs.build_android
run: |
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/dispatch ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/os ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/Block ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/_foundation_unicode ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/include
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift/_FoundationCShims ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/include
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/dispatch ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/os ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/Block ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/include/
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/_foundation_unicode ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/include
Move-Item ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/lib/swift_static/_FoundationCShims ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/SDKs/AndroidExperimental.sdk/usr/include
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_SP_CREDENTIALS }}
if: inputs.build_android && inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
- uses: actions/download-artifact@v4
if: inputs.build_android && inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
with:
name: trusted-signing-dll
path: ${{ runner.temp }}/trusted-signing-dll
- name: Prepare trusted signing arguments
if: inputs.build_android && inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
run: |
# We're unconditionally using x64 because there's no arm64 version of the DLL as of Oct 2025.
# TODO: Update with more info once we've filed a bug against Microsoft.
$signtoolPath = Join-Path -Path ${env:WindowsSdkVerBinPath} -ChildPath "x64/"
echo "SIGNTOOL_PATH=$signtoolPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$trustedSigningDllPath = Join-Path -Path ${env:RUNNER_TEMP}/trusted-signing-dll -ChildPath "Azure.CodeSigning.Dlib.dll"
echo "TRUSTED_SIGNING_DLL_PATH=$trustedSigningDllPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$metadataPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath "metadata.json"
'{
"Endpoint": "https://eus.codesigning.azure.net",
"CodeSigningAccountName": "${{ secrets.TRUSTED_SIGNING_ACCOUNT }}",
"CertificateProfileName": "${{ secrets.TRUSTED_SIGNING_PROD_PROFILE }}",
"ExcludeCredentials": [
"ManagedIdentityCredential",
"WorkloadIdentityCredential",
"SharedTokenCacheCredential",
"VisualStudioCredential",
"VisualStudioCodeCredential",
"EnvironmentCredential",
"AzurePowerShellCredential",
"AzureDeveloperCliCredential",
"InteractiveBrowserCredential"
]
}' | Out-File -FilePath $metadataPath -Encoding utf8
echo "TRUSTED_SIGNING_METADATA_PATH=$metadataPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
- if: inputs.build_android
name: Package SDK
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:ANDROID_INCLUDE_DS2=true `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ImageRoot=${{ github.workspace }}/BuildRoot/Library/Developer `
-p:ProductVersion=${{ inputs.swift_version }} `
-p:ProductArchitecture=${{ inputs.build_arch }} `
-p:AndroidArchitectures="`"x86_64;aarch64;i686;armv7`"" `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/platforms/android/android.wixproj
- if: ${{ inputs.build_android && inputs.release }}
uses: actions/attest-build-provenance@v2
with:
subject-path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/android.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/android.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.arm64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.arm.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.x64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.x86.cab
- if: inputs.build_android
uses: actions/upload-artifact@v4
with:
name: Android-platform-msi
path: |
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/android.msi
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/android.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.arm64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.arm.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.x64.cab
${{ github.workspace }}/BinaryCache/installer/Release/${{ inputs.build_arch }}/sdk.android.x86.cab
installer:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
needs: [package_tools, package_windows_platform, package_android_platform, configure_signing]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.host_matrix) }}
steps:
- uses: actions/[email protected]
with:
path: ${{ github.workspace }}/SourceCache/ci-build
show-progress: false
- uses: actions/[email protected]
with:
repository: swiftlang/swift-docc-render-artifact
ref: ${{ inputs.swift_docc_render_artifact_revision }}
path: ${{ github.workspace }}/SourceCache/swift-docc-render-artifact
show-progress: false
- uses: ./SourceCache/ci-build/.github/actions/setup-build
with:
setup-vs-dev-env: true
host-arch: ${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-bld-asserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-bld-noasserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-cli-asserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-cli-noasserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-dbg-asserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-dbg-noasserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-ide-asserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-ide-noasserts-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-${{ matrix.arch }}-rtl-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
name: Windows-amd64-rtl-msm
path: ${{ github.workspace }}/BinaryCache/installer/Release/amd64
- uses: actions/download-artifact@v4
with:
name: Windows-x86-rtl-msm
path: ${{ github.workspace }}/BinaryCache/installer/Release/x86
- uses: actions/download-artifact@v4
with:
name: Windows-arm64-rtl-msm
path: ${{ github.workspace }}/BinaryCache/installer/Release/arm64
- uses: actions/download-artifact@v4
with:
name: Windows-platform-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/download-artifact@v4
if: inputs.build_android
with:
name: Android-platform-msi
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}
- uses: actions/[email protected]
with:
repository: swiftlang/swift-installer-scripts
ref: ${{ inputs.swift_installer_scripts_revision }}
path: ${{ github.workspace }}/SourceCache/swift-installer-scripts
show-progress: false
- run: |
$CertificatePath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.b64
$PFXPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath CodeSign.pfx
Set-Content -Path $CertificatePath -Value '${{ secrets.CERTIFICATE }}'
certutil -decode $CertificatePath $PFXPath
Echo CERTIFICATE=$PFXPath | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'false'
- name: Authenticate with Azure
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_SP_CREDENTIALS }}
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
- uses: actions/download-artifact@v4
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
with:
name: trusted-signing-dll
path: ${{ runner.temp }}/trusted-signing-dll
- name: Prepare trusted signing arguments
if: inputs.signed && needs.configure_signing.outputs.uses_trusted_signing == 'true'
run: |
# We're unconditionally using x64 because there's no arm64 version of the DLL as of Oct 2025.
# TODO: Update with more info once we've filed a bug against Microsoft.
$signtoolPath = Join-Path -Path ${env:WindowsSdkVerBinPath} -ChildPath "x64/"
echo "SIGNTOOL_PATH=$signtoolPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$trustedSigningDllPath = Join-Path -Path ${env:RUNNER_TEMP}/trusted-signing-dll -ChildPath "Azure.CodeSigning.Dlib.dll"
echo "TRUSTED_SIGNING_DLL_PATH=$trustedSigningDllPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
$metadataPath = Join-Path -Path ${env:RUNNER_TEMP} -ChildPath "metadata.json"
'{
"Endpoint": "https://eus.codesigning.azure.net",
"CodeSigningAccountName": "${{ secrets.TRUSTED_SIGNING_ACCOUNT }}",
"CertificateProfileName": "${{ secrets.TRUSTED_SIGNING_PROD_PROFILE }}",
"ExcludeCredentials": [
"ManagedIdentityCredential",
"WorkloadIdentityCredential",
"SharedTokenCacheCredential",
"VisualStudioCredential",
"VisualStudioCodeCredential",
"EnvironmentCredential",
"AzurePowerShellCredential",
"AzureDeveloperCliCredential",
"InteractiveBrowserCredential"
]
}' | Out-File -FilePath $metadataPath -Encoding utf8
echo "TRUSTED_SIGNING_METADATA_PATH=$metadataPath" | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append
# The installer bundle needs the shared project for localization strings,
# but it won't build the dependency on its own due to -p:BuildProjectReferences=false.
- name: Build shared project
run: |
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:ProductArchitecture=${{ matrix.arch }} `
-p:ProductVersion=${{ inputs.swift_version }}-${{ inputs.swift_tag }} `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/shared/shared.wixproj
- name: Build installer bundle (offline)
run: |
$Platforms=@("windows")
if ("${{ inputs.build_android }}" -eq "true") {
$Platforms=@("android") + $Platforms
}
msbuild -nologo -restore -maxCpuCount `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:BuildProjectReferences=false `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:BundleFlavor=offline `
-p:Platforms="`"$($Platforms -Join ';')`"" `
-p:AndroidArchitectures="`"aarch64;armv7;i686;x86_64`"" `
-p:WindowsArchitectures="`"aarch64;i686;x86_64`"" `
-p:ProductArchitecture=${{ matrix.arch }} `
-p:ProductVersion=${{ inputs.swift_version }}-${{ inputs.swift_tag }} `
-p:ToolchainVariants="`"asserts;noasserts`"" `
-p:IncludeLegacySDK=True `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/bundle/installer.wixproj
- name: Generate Build Provenance (offline installer)
if: ${{ inputs.release }}
uses: actions/attest-build-provenance@v2
with:
subject-path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/installer.exe
- name: Upload installer (offline)
uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-installer-offline
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/installer.exe
- name: Generate online installer download URL
if: ${{ inputs.release }}
id: generate-base-release-download-subcomponent
run: |
$BaseReleaseDownloadUrlSubcomponent = "${{ inputs.swift_tag }}/${{ matrix.arch }}/${{ github.run_id }}"
echo "url_subcomponent=$BaseReleaseDownloadUrlSubcomponent" >> $env:GITHUB_OUTPUT
- name: Build installer bundle (online)
if: ${{ inputs.release }}
run: |
$Platforms=@("windows")
if ("${{ inputs.build_android }}" -eq "true") {
$Platforms=@("android") + $Platforms
}
$BaseReleaseDownloadUrl = "https://swift-toolchain.thebrowserco.com/${{ steps.generate-base-release-download-subcomponent.outputs.url_subcomponent }}"
msbuild -nologo -restore -maxCpuCount `
/t:rebuild `
-p:BaseOutputPath=${{ github.workspace }}\BinaryCache\installer\ `
-p:Configuration=Release `
-p:BuildProjectReferences=false `
-p:SignOutput=${{ inputs.signed }} `
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:SWIFT_DOCC_RENDER_ARTIFACT_ROOT = "${{ github.workspace }}\SourceCache\swift-docc-render-artifact" `
-p:SignToolPath=${env:SIGNTOOL_PATH} `
-p:AzureSignMetadata=${env:TRUSTED_SIGNING_METADATA_PATH} `
-p:AzureSignDlib=${env:TRUSTED_SIGNING_DLL_PATH} `
-p:BundleFlavor=online `
-p:BaseReleaseDownloadUrl=$BaseReleaseDownloadUrl `
-p:Platforms="`"$($Platforms -Join ';')`"" `
-p:AndroidArchitectures="`"aarch64;armv7;i686;x86_64`"" `
-p:WindowsArchitectures="`"aarch64;i686;x86_64`"" `
-p:ProductArchitecture=${{ matrix.arch }} `
-p:ProductVersion=${{ inputs.swift_version }}-${{ inputs.swift_tag }} `
-p:ToolchainVariants="`"asserts;noasserts`"" `
-p:IncludeLegacySDK=True `
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/bundle/installer.wixproj
- name: Prepare layout for upload
id: prepare-layout
if: ${{ inputs.release }}
run: |
# Create the target folder.
$SourceDir = "${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}"
$LayoutDir = "${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/layout"
New-Item -ItemType Directory -Path $LayoutDir -Force | Out-Null
# Copy all .txt files from src to the filtered directory
Copy-Item -Path "$SourceDir/installer.exe" -Destination "$LayoutDir" -Force
Copy-Item -Path "$SourceDir/*.cab" -Destination "$LayoutDir" -Force
Copy-Item -Path "$SourceDir/*.msi" -Destination "$LayoutDir" -Force
echo "LayoutDir=$LayoutDir"
echo "LayoutDir=$LayoutDir" >> $env:GITHUB_OUTPUT
- name: Generate Build Provenance (online installer)
if: ${{ inputs.release }}
uses: actions/attest-build-provenance@v2
with:
subject-path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/installer.exe
- name: Upload installer (online)
if: ${{ inputs.release }}
uses: actions/upload-artifact@v4
with:
name: Windows-${{ matrix.arch }}-installer-online
path: ${{ github.workspace }}/BinaryCache/installer/Release/${{ matrix.arch }}/installer.exe
- name: Upload msi's and cab's
if: ${{ inputs.release }}
env:
SOURCE_DIR: ${{ steps.prepare-layout.outputs.LayoutDir }}
DESTINATION_PREFIX: ${{ steps.generate-base-release-download-subcomponent.outputs.url_subcomponent }}
R2_BUCKET: swift-toolchain
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
R2_ENDPOINT_URL: https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
run: |
aws s3 sync "${env:SOURCE_DIR}" "s3://${env:R2_BUCKET}/${env:DESTINATION_PREFIX}/" `
--endpoint-url "${env:R2_ENDPOINT_URL}" `
--no-progress `
--acl private
smoke_test:
# TODO: Build this on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows'
needs: [installer]
runs-on: ${{ inputs.default_build_runner }}
steps:
- uses: actions/[email protected]
with:
repository: compnerd/swift-win32
ref: refs/heads/main
path: ${{ github.workspace }}/SourceCache/swift-win32
show-progress: false
- uses: actions/[email protected]
with:
repository: pointfreeco/swift-issue-reporting
ref: refs/heads/main
path: ${{ github.workspace }}/SourceCache/swift-issue-reporting
show-progress: false
- name: Download Swift SDK Installer (${{ inputs.release && 'online' || 'offline' }})
uses: actions/download-artifact@v4
with:
name: Windows-${{ inputs.build_arch }}-installer-${{ inputs.release && 'online' || 'offline' }}
path: ${{ github.workspace }}/tmp
# TODO(compnerd): migrate this to compnerd/gha-setup-swift after the work that @mangini is doing is completed
- run: |
function Update-EnvironmentVariables {
foreach ($level in "Machine", "User") {
[Environment]::GetEnvironmentVariables($level).GetEnumerator() | % {
# For Path variables, append the new values, if they're not already in there
if ($_.Name -Match 'Path$') {
$_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -Split ';' | Select -Unique) -Join ';'
}
$_
} | Set-Content -Path { "Env:$($_.Name)" }
}
}
try {
Write-Host "Starting Install installer.exe..."
$Process = Start-Process -FilePath ${{ github.workspace }}/tmp/installer.exe -ArgumentList ("-q") -Wait -PassThru
$ExitCode = $Process.ExitCode
if ($ExitCode -eq 0 -or $ExitCode -eq 3010) {
Write-Host "Installation successful"
} else {
Write-Host "non-zero exit code returned by the installation process: $ExitCode"
exit $ExitCode
}
} catch {
Write-Host "Failed to install: $($_.Exception.Message)"
exit 1
}
Update-EnvironmentVariables
# Reset Path and environment
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
Get-ChildItem Env: | % { echo "$($_.Name)=$($_.Value)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append }
- name: Build & Test compnerd/swift-win32
working-directory: ${{ github.workspace }}/SourceCache/swift-win32
run: |
swift build
swift test -Xswiftc -DENABLE_TESTING
- name: Build & Test pointfreeco/swift-issue-reporting
working-directory: ${{ github.workspace }}/SourceCache/swift-issue-reporting
run: |
swift build -c release
swift test -c release
# Ensures redistributables contain all expected DLLs.
redistributable_smoke_test:
if: inputs.build_os == 'Windows'
needs: [package_windows_platform]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix:
arch: ["amd64", "arm64", "x86"]
variant: ["static", "shared"]
env:
MSM_ARTIFACT_NAME: Windows-${{ matrix.arch }}-rtl-${{ matrix.variant }}-msm
MSM_FILE_NAME: rtl.${{ matrix.variant }}.${{ matrix.arch }}.msm
EXPECTED: >
${{ matrix.variant == 'shared' && (
matrix.arch == 'amd64' && needs.package_windows_platform.outputs.expected-dlls-amd64 ||
matrix.arch == 'arm64' && needs.package_windows_platform.outputs.expected-dlls-arm64 ||
matrix.arch == 'x86' && needs.package_windows_platform.outputs.expected-dlls-x86
) || '["BlocksRuntime.dll", "dispatch.dll"]' }}
steps:
- name: Download MSM
uses: actions/download-artifact@v4
with:
name: ${{ env.MSM_ARTIFACT_NAME }}
path: ${{ runner.temp }}
- name: Test ${{ matrix.variant }} ${{ matrix.arch }}
run: |
$msmPath = Join-Path $env:RUNNER_TEMP $env:MSM_FILE_NAME
$installer = New-Object -ComObject WindowsInstaller.Installer
$db = $installer.OpenDatabase($msmPath, 0)
$view = $db.OpenView("SELECT FileName FROM ``File``")
$view.Execute()
$dlls = @()
while ($record = $view.Fetch()) {
$data = $record.StringData(1)
$file = $data.Split('|')[-1]
if ($file.EndsWith('.dll')) {
$dlls += $file
}
}
$actual = [System.Collections.Generic.HashSet[string]]::new([string[]]$dlls)
$expected = $env:EXPECTED | ConvertFrom-Json
$missing = $expected | Where-Object { -not $actual.Contains($_) }
if ($missing.Count -gt 0) {
$missing | ForEach-Object { Write-Host "::error:: '$_' not found in '$env:MSM_FILE_NAME'" }
exit 1
}
smoke_test_android:
# TODO: Run this job on macOS or make an equivalent Mac-only job
if: inputs.build_os == 'Windows' && inputs.build_android
needs: [installer]
runs-on: ${{ inputs.default_build_runner }}
strategy:
fail-fast: false
matrix:
arch: [ x86_64, aarch64 ]
steps:
- name: Checkout cassowary project
uses: actions/[email protected]
with:
repository: compnerd/cassowary
ref: 0.0.2
path: ${{ github.workspace }}/SourceCache/cassowary
- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
local-cache: true
- name: Download Swift SDK Installer (${{ inputs.release && 'online' || 'offline' }})
uses: actions/download-artifact@v4
with:
name: Windows-${{ inputs.build_arch }}-installer-${{ inputs.release && 'online' || 'offline' }}
path: ${{ github.workspace }}/tmp
# TODO(compnerd): migrate this to compnerd/gha-setup-swift after the work that @mangini is doing is completed
- name: Install Swift SDK
run: |
function Update-EnvironmentVariables {
foreach ($level in "Machine", "User") {
[Environment]::GetEnvironmentVariables($level).GetEnumerator() | % {
# For Path variables, append the new values, if they're not already in there
if ($_.Name -Match 'Path$') {
$_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -Split ';' | Select -Unique) -Join ';'
}
$_
} | Set-Content -Path { "Env:$($_.Name)" }
}
}
try {
Write-Host "Starting Install installer.exe..."
$Process = Start-Process -FilePath ${{ github.workspace }}/tmp/installer.exe -ArgumentList ("-q") -Wait -PassThru
$ExitCode = $Process.ExitCode
if ($ExitCode -eq 0 -or $ExitCode -eq 3010) {
Write-Host "Installation successful"
} else {
Write-Host "non-zero exit code returned by the installation process: $ExitCode"
exit $ExitCode
}
} catch {
Write-Host "Failed to install: $($_.Exception.Message)"
exit 1
}
Update-EnvironmentVariables
# Reset Path and environment
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
Get-ChildItem Env: | % { echo "$($_.Name)=$($_.Value)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append }
- name: Setup Swift environment
id: android-swift-env
run: |
echo "sysroot=$(resolve-path ${{ steps.setup-ndk.outputs.ndk-path }}\toolchains\llvm\prebuilt\windows-x86_64\sysroot)" >> $env:GITHUB_OUTPUT
echo "sdkroot=$(resolve-path $env:SDKROOT\..\..\..\..\Android.platform\Developer\SDKs\Android.sdk)" >> $env:GITHUB_OUTPUT
echo "clang-resource-dir=$(& $(resolve-path "${{ steps.setup-ndk.outputs.ndk-path }}\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe") -print-resource-dir)" >> $env:GITHUB_OUTPUT
- name: Build cassowary project
run: |
swift build `
--package-path ${{ github.workspace }}/SourceCache/cassowary `
--triple ${{ matrix.arch }}-unknown-linux-android${{ inputs.ANDROID_API_LEVEL }} `
--sdk "${{ steps.android-swift-env.outputs.sysroot }}" `
-Xswiftc -sdk -Xswiftc "${{ steps.android-swift-env.outputs.sdkroot }}" `
-Xswiftc -sysroot -Xswiftc "${{ steps.android-swift-env.outputs.sysroot }}" `
-Xswiftc -I -Xswiftc "${{ steps.android-swift-env.outputs.sdkroot }}\usr\include" `
-Xswiftc -Xclang-linker -Xswiftc -resource-dir -Xswiftc -Xclang-linker -Xswiftc ${{ steps.android-swift-env.outputs.clang-resource-dir }}