-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1673,9 +1673,9 @@ jobs: | |
} | ||
cmake --build ${{ github.workspace }}/BinaryCache/swift --target install | ||
- uses: actions/upload-artifact@v4 | ||
- uses: thebrowsercompany/gha-upload-tar-artifact@main | ||
with: | ||
name: ${{ matrix.platform }}-stdlib-${{ matrix.arch }} | ||
name: ${{ matrix.os }}-stdlib-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.platform }}.platform | ||
|
||
- uses: actions/upload-artifact@v4 | ||
|
@@ -1703,46 +1703,38 @@ jobs: | |
searchPattern: '**/*.dll' | ||
|
||
macros: | ||
# TODO: Build this on macOS or make an equivalent Mac-only job | ||
if: always() && inputs.build_os == 'Windows' && needs.stdlib.result == 'success' | ||
if: always() && needs.stdlib.result == 'success' | ||
needs: [compilers, cmark_gfm, stdlib] | ||
runs-on: ${{ inputs.default_build_runner }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- arch: 'amd64' | ||
cpu: 'x86_64' | ||
triple: 'x86_64-unknown-windows-msvc' | ||
|
||
- arch: 'arm64' | ||
cpu: 'aarch64' | ||
triple: 'aarch64-unknown-windows-msvc' | ||
matrix: ${{ fromJSON(inputs.host_matrix) }} | ||
|
||
name: Windows ${{ matrix.arch }} Macros | ||
name: ${{ matrix.os }} ${{ matrix.arch }} Macros | ||
|
||
steps: | ||
- name: Download Compilers | ||
uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
name: compilers-Windows-${{ inputs.build_arch }} | ||
name: compilers-${{ inputs.build_os }}-${{ inputs.build_arch }} | ||
path: ${{ github.workspace }}/BinaryCache/Library | ||
- name: Download swift-syntax | ||
uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
name: swift-syntax-Windows-${{ matrix.arch }} | ||
name: swift-syntax-${{ matrix.os }}-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BinaryCache/swift-syntax | ||
- uses: actions/download-artifact@v4 | ||
- uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
name: Windows-stdlib-${{ matrix.arch }} | ||
name: ${{ matrix.os }}-stdlib-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform | ||
- uses: actions/download-artifact@v4 | ||
if: matrix.arch == 'arm64' | ||
- uses: thebrowsercompany/gha-download-tar-artifact@main | ||
if: matrix.os == 'Windows' && matrix.arch == 'arm64' | ||
with: | ||
name: Windows-stdlib-amd64 | ||
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform | ||
- uses: actions/download-artifact@v4 | ||
if: matrix.os == 'Windows' | ||
with: | ||
name: windows-vfs-overlay-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BinaryCache/swift/stdlib | ||
|
@@ -1772,29 +1764,53 @@ jobs: | |
components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' | ||
arch: ${{ matrix.arch }} | ||
|
||
- 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 | ||
- name: Setup configuration | ||
id: setup-config | ||
run: | | ||
$PlatformLower = "${{ matrix.platform }}".ToLower() | ||
$SDKRoot = "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.platform }}.platform/Developer/SDKs/${{ matrix.platform }}.sdk" | ||
$bindir = "${{ github.workspace }}/BinaryCache/swift-syntax" | ||
$SwiftFlags = "-resource-dir ${SDKRoot}/usr/lib/swift" | ||
$SwiftFlags += " -L${SDKRoot}/usr/lib/swift/${PlatformLower}" | ||
$SwiftFlags += " -strict-implicit-module-context" | ||
$SwiftFlags += " ${{ matrix.swiftflags }}" | ||
if ("${{ matrix.os }}" -eq "Windows") { | ||
$SwiftC = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe" | ||
$bindir = cygpath -w $bindir | ||
# Export the path to the runtime libraries. This is only needed for Windows. | ||
$RTLPath = cygpath -w ${SDKRoot}/usr/bin | ||
Write-Output ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
# VFS Overlay is only required on Windows. | ||
$SwiftFlags += " -vfsoverlay ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml" | ||
# Add the Windows SDK headers to the system include path for Windows. | ||
$SwiftFlags += " -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules" | ||
} else { | ||
$SwiftC = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc" | ||
} | ||
# Configure swift-syntax. | ||
$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 | ||
# Export the configuration. | ||
Write-Output "swiftc=${SwiftC}" | Out-File -FilePath ${env:GITHUB_OUTPUT} -Encoding utf8 -Append | ||
Write-Output "swift-flags=${SwiftFlags}" | Out-File -FilePath ${env:GITHUB_OUTPUT} -Encoding utf8 -Append | ||
- name: Configure Foundation Macros | ||
run: | | ||
$WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml | ||
$SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe | ||
cmake -B ${{ github.workspace }}/BinaryCache/swift-foundation-macros ` | ||
-D CMAKE_BUILD_TYPE=Release ` | ||
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr ` | ||
-D CMAKE_Swift_COMPILER=${SWIFTC} ` | ||
-D CMAKE_Swift_COMPILER=${{ steps.setup-config.outputs.swiftc }} ` | ||
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} ` | ||
-D CMAKE_Swift_FLAGS="-resource-dir ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift -L${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows -vfsoverlay ${WINDOWS_VFS_OVERLAY} -strict-implicit-module-context -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules ${{ inputs.CMAKE_Swift_FLAGS }}" ` | ||
-D CMAKE_Swift_FLAGS="${{ steps.setup-config.outputs.swift-flags }}" ` | ||
-D CMAKE_Swift_FLAGS_RELEASE="-O" ` | ||
-D CMAKE_SYSTEM_NAME=Windows ` | ||
-D CMAKE_SYSTEM_NAME=${{ matrix.os }} ` | ||
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} ` | ||
-G Ninja ` | ||
-S ${{ github.workspace }}/SourceCache/swift-foundation/Sources/FoundationMacros ` | ||
|
@@ -1804,16 +1820,13 @@ jobs: | |
|
||
- name: Configure Testing Macros | ||
run: | | ||
$WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml | ||
$SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe | ||
cmake -B ${{ github.workspace }}/BinaryCache/swift-testing-macros ` | ||
-D CMAKE_BUILD_TYPE=Release ` | ||
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr ` | ||
-D CMAKE_Swift_COMPILER=${SWIFTC} ` | ||
-D CMAKE_Swift_COMPILER=${{ steps.setup-config.outputs.swiftc }} ` | ||
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} ` | ||
-D CMAKE_Swift_FLAGS="-resource-dir ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift -L${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift/windows -vfsoverlay ${WINDOWS_VFS_OVERLAY} -strict-implicit-module-context -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules ${{ inputs.CMAKE_Swift_FLAGS }}" ` | ||
-D CMAKE_SYSTEM_NAME=Windows ` | ||
-D CMAKE_Swift_FLAGS="${{ steps.setup-config.outputs.swift-flags }}" ` | ||
-D CMAKE_SYSTEM_NAME=${{ matrix.os }} ` | ||
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} ` | ||
-G Ninja ` | ||
-S ${{ github.workspace }}/SourceCache/swift-testing/Sources/TestingMacros ` | ||
|
@@ -1827,14 +1840,14 @@ jobs: | |
run: cmake --build ${{ github.workspace }}/BinaryCache/swift-testing-macros --target install | ||
|
||
- name: Upload macros | ||
uses: actions/upload-artifact@v4 | ||
uses: thebrowsercompany/gha-upload-tar-artifact@main | ||
with: | ||
name: macros-${{ matrix.arch }} | ||
name: macros-${{ matrix.os }}-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BuildRoot/Library | ||
|
||
- name: Upload PDBs to Azure | ||
uses: microsoft/[email protected] | ||
if: ${{ inputs.debug_info }} | ||
if: ${{ inputs.debug_info && matrix.os == 'Windows' }} | ||
with: | ||
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }} | ||
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }} | ||
|
@@ -1843,7 +1856,7 @@ jobs: | |
|
||
- name: Upload DLLs to Azure | ||
uses: microsoft/[email protected] | ||
if: ${{ inputs.debug_info }} | ||
if: ${{ inputs.debug_info && matrix.os == 'Windows' }} | ||
with: | ||
accountName: ${{ vars.SYMBOL_SERVER_ACCOUNT }} | ||
personalAccessToken: ${{ secrets.SYMBOL_SERVER_PAT }} | ||
|
@@ -1985,9 +1998,9 @@ jobs: | |
with: | ||
name: windows-vfs-overlay-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BinaryCache/swift/stdlib | ||
- uses: actions/download-artifact@v4 | ||
- uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
name: macros-amd64 | ||
name: macros-Windows-amd64 | ||
path: ${{ github.workspace }}/BinaryCache/Library | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -2375,9 +2388,9 @@ jobs: | |
with: | ||
name: Windows-sdk-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform | ||
- uses: actions/download-artifact@v4 | ||
- uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
name: macros-amd64 | ||
name: macros-Windows-amd64 | ||
path: ${{ github.workspace }}/BinaryCache/Library | ||
- uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
|
@@ -3218,9 +3231,9 @@ jobs: | |
path: ${{ github.workspace }}/BuildRoot/Library | ||
|
||
- name: Download Macros | ||
uses: actions/download-artifact@v4 | ||
uses: thebrowsercompany/gha-download-tar-artifact@main | ||
with: | ||
name: macros-${{ matrix.arch }} | ||
name: macros-Windows-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/BuildRoot/Library | ||
|
||
- uses: actions/checkout@v4 | ||
|