@@ -1703,9 +1703,9 @@ jobs:
1703
1703
}
1704
1704
cmake --build ${{ github.workspace }}/BinaryCache/swift --target install
1705
1705
1706
- - uses : actions/ upload-artifact@v4
1706
+ - uses : thebrowsercompany/gha- upload-tar- artifact@d8f9b9d463a319b5b65b273db0a4e12ab0b10e72
1707
1707
with :
1708
- name : ${{ matrix.os }}-stdlib -${{ matrix.arch }}
1708
+ name : stdlib- ${{ matrix.os}} -${{ matrix.arch }}
1709
1709
path : ${{ github.workspace }}/BuildRoot/Library
1710
1710
1711
1711
- uses : actions/upload-artifact@v4
@@ -1733,46 +1733,38 @@ jobs:
1733
1733
searchPattern : ' **/*.dll'
1734
1734
1735
1735
macros :
1736
- # TODO: Build this on macOS or make an equivalent Mac-only job
1737
- if : always() && inputs.build_os == 'Windows' && needs.stdlib.result == 'success'
1736
+ if : always() && needs.stdlib.result == 'success'
1738
1737
needs : [compilers, cmark_gfm, stdlib]
1739
1738
runs-on : ${{ inputs.default_build_runner }}
1740
1739
1741
1740
strategy :
1742
1741
fail-fast : false
1743
- matrix :
1744
- include :
1745
- - arch : ' amd64'
1746
- cpu : ' x86_64'
1747
- triple : ' x86_64-unknown-windows-msvc'
1748
-
1749
- - arch : ' arm64'
1750
- cpu : ' aarch64'
1751
- triple : ' aarch64-unknown-windows-msvc'
1742
+ matrix : ${{ fromJSON(inputs.host_matrix) }}
1752
1743
1753
- name : Windows ${{ matrix.arch }} Macros
1744
+ name : ${{ matrix.os }} ${{ matrix.arch }} Macros
1754
1745
1755
1746
steps :
1756
1747
- name : Download Compilers
1757
1748
uses : thebrowsercompany/gha-download-tar-artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
1758
1749
with :
1759
- name : compilers-Windows -${{ inputs.build_arch }}
1750
+ name : compilers-${{ inputs.build_os }} -${{ inputs.build_arch }}
1760
1751
path : ${{ github.workspace }}/BinaryCache/Library
1761
1752
- name : Download swift-syntax
1762
1753
uses : thebrowsercompany/gha-download-tar-artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
1763
1754
with :
1764
- name : swift-syntax-Windows -${{ matrix.arch }}
1755
+ name : swift-syntax-${{ matrix.os }} -${{ matrix.arch }}
1765
1756
path : ${{ github.workspace }}/BinaryCache/swift-syntax
1766
- - uses : actions/ download-artifact@v4
1757
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
1767
1758
with :
1768
- name : Windows- stdlib-${{ matrix.arch }}
1759
+ name : stdlib-${{ matrix.os }} -${{ matrix.arch }}
1769
1760
path : ${{ github.workspace }}/BinaryCache/Library
1770
- - uses : actions/ download-artifact@v4
1771
- if : matrix.arch == 'arm64'
1761
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
1762
+ if : matrix.os == 'Windows' && matrix. arch == 'arm64'
1772
1763
with :
1773
- name : Windows- stdlib-amd64
1764
+ name : stdlib-Windows -amd64
1774
1765
path : ${{ github.workspace }}/BinaryCache/Library
1775
1766
- uses : actions/download-artifact@v4
1767
+ if : matrix.os == 'Windows'
1776
1768
with :
1777
1769
name : windows-vfs-overlay-${{ matrix.arch }}
1778
1770
path : ${{ github.workspace }}/BinaryCache/swift/stdlib
@@ -1802,29 +1794,53 @@ jobs:
1802
1794
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
1803
1795
arch : ${{ matrix.arch }}
1804
1796
1805
- - run : |
1806
- $RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
1807
- echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1797
+ - uses : seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401
1798
+ if : inputs.build_os == 'Darwin'
1808
1799
1809
- - name : extract swift-syntax
1800
+ - name : Setup configuration
1801
+ id : setup-config
1810
1802
run : |
1803
+ $PlatformLower = "${{ matrix.platform }}".ToLower()
1804
+ $bindir = "${{ github.workspace }}/BinaryCache/swift-syntax"
1805
+
1806
+ $SwiftFlags = "${{ matrix.swiftflags }} -strict-implicit-module-context"
1807
+
1808
+ if ("${{ matrix.os }}" -eq "Windows") {
1809
+ $SwiftC = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe"
1810
+ $bindir = cygpath -m $bindir
1811
+ $SDKRoot = "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.platform }}.platform/Developer/SDKs/${{ matrix.platform }}.sdk"
1812
+ $SwiftFlags += " -resource-dir ${SDKRoot}/usr/lib/swift"
1813
+ $SwiftFlags += " -L${SDKRoot}/usr/lib/swift/${PlatformLower}"
1814
+
1815
+ # Export the path to the runtime libraries. This is only needed for Windows.
1816
+ $RTLPath = cygpath -w ${SDKRoot}/usr/bin
1817
+ Write-Output ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1818
+
1819
+ # VFS Overlay is only required on Windows.
1820
+ $SwiftFlags += " -vfsoverlay ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml"
1821
+ $SwiftFlags += " -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules"
1822
+ } else {
1823
+ $SwiftC = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc"
1824
+ }
1825
+
1826
+ # Configure swift-syntax.
1811
1827
$module = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules/SwiftSyntaxConfig.cmake"
1812
- $bindir = cygpath -m ${{ github.workspace }}/BinaryCache/swift-syntax
1813
1828
(Get-Content $module).Replace('<BINARY_DIR>', "${bindir}") | Set-Content $module
1814
1829
1830
+ # Export the configuration.
1831
+ Write-Output "swiftc=${SwiftC}" | Out-File -FilePath ${env:GITHUB_OUTPUT} -Encoding utf8 -Append
1832
+ Write-Output "swift-flags=${SwiftFlags}" | Out-File -FilePath ${env:GITHUB_OUTPUT} -Encoding utf8 -Append
1833
+
1815
1834
- name : Configure Foundation Macros
1816
1835
run : |
1817
- $WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml
1818
- $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe
1819
-
1820
1836
cmake -B ${{ github.workspace }}/BinaryCache/swift-foundation-macros `
1821
1837
-D CMAKE_BUILD_TYPE=Release `
1822
1838
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr `
1823
- -D CMAKE_Swift_COMPILER=${SWIFTC } `
1839
+ -D CMAKE_Swift_COMPILER=${{ steps.setup-config.outputs.swiftc } } `
1824
1840
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
1825
- -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 }}" `
1841
+ -D CMAKE_Swift_FLAGS="${{ steps.setup-config.outputs. swift-flags }}" `
1826
1842
-D CMAKE_Swift_FLAGS_RELEASE="-O" `
1827
- -D CMAKE_SYSTEM_NAME=Windows `
1843
+ -D CMAKE_SYSTEM_NAME=${{ matrix.os }} `
1828
1844
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
1829
1845
-G Ninja `
1830
1846
-S ${{ github.workspace }}/SourceCache/swift-foundation/Sources/FoundationMacros `
@@ -1834,16 +1850,13 @@ jobs:
1834
1850
1835
1851
- name : Configure Testing Macros
1836
1852
run : |
1837
- $WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml
1838
- $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe
1839
-
1840
1853
cmake -B ${{ github.workspace }}/BinaryCache/swift-testing-macros `
1841
1854
-D CMAKE_BUILD_TYPE=Release `
1842
1855
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr `
1843
- -D CMAKE_Swift_COMPILER=${SWIFTC } `
1856
+ -D CMAKE_Swift_COMPILER=${{ steps.setup-config.outputs.swiftc } } `
1844
1857
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
1845
- -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 }}" `
1846
- -D CMAKE_SYSTEM_NAME=Windows `
1858
+ -D CMAKE_Swift_FLAGS="${{ steps.setup-config.outputs. swift-flags }}" `
1859
+ -D CMAKE_SYSTEM_NAME=${{ matrix.os }} `
1847
1860
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
1848
1861
-G Ninja `
1849
1862
-S ${{ github.workspace }}/SourceCache/swift-testing/Sources/TestingMacros `
@@ -1857,14 +1870,14 @@ jobs:
1857
1870
run : cmake --build ${{ github.workspace }}/BinaryCache/swift-testing-macros --target install
1858
1871
1859
1872
- name : Upload macros
1860
- uses : actions/ upload-artifact@v4
1873
+ uses : thebrowsercompany/gha- upload-tar- artifact@d8f9b9d463a319b5b65b273db0a4e12ab0b10e72
1861
1874
with :
1862
- name : macros-${{ matrix.arch }}
1875
+ name : macros-${{ matrix.os }}-${{ matrix. arch }}
1863
1876
path : ${{ github.workspace }}/BuildRoot/Library
1864
1877
1865
1878
- name : Upload PDBs to Azure
1866
1879
uses : microsoft/action-publish-symbols@v2.1.6
1867
- if : ${{ inputs.debug_info }}
1880
+ if : ${{ inputs.debug_info && matrix.os == 'Windows' }}
1868
1881
with :
1869
1882
accountName : ${{ vars.SYMBOL_SERVER_ACCOUNT }}
1870
1883
personalAccessToken : ${{ secrets.SYMBOL_SERVER_PAT }}
@@ -1873,7 +1886,7 @@ jobs:
1873
1886
1874
1887
- name : Upload DLLs to Azure
1875
1888
uses : microsoft/action-publish-symbols@v2.1.6
1876
- if : ${{ inputs.debug_info }}
1889
+ if : ${{ inputs.debug_info && matrix.os == 'Windows' }}
1877
1890
with :
1878
1891
accountName : ${{ vars.SYMBOL_SERVER_ACCOUNT }}
1879
1892
personalAccessToken : ${{ secrets.SYMBOL_SERVER_PAT }}
@@ -2002,23 +2015,25 @@ jobs:
2002
2015
with :
2003
2016
name : compilers-Windows-${{ inputs.build_arch }}
2004
2017
path : ${{ github.workspace }}/BinaryCache/Library
2005
- - uses : actions/download-artifact@v4
2018
+
2019
+ - uses : thebrowsercompany/gha-download-tar-artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2006
2020
with :
2007
- name : ${{ matrix.os }}-stdlib -${{ matrix.arch }}
2021
+ name : stdlib- ${{ matrix.os }}-${{ matrix.arch }}
2008
2022
path : ${{ github.workspace }}/BinaryCache/Library
2009
- - uses : actions/ download-artifact@v4
2023
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2010
2024
with :
2011
- name : Windows- stdlib-amd64
2025
+ name : stdlib-Windows -amd64
2012
2026
path : ${{ github.workspace }}/BinaryCache/Library
2013
2027
- uses : actions/download-artifact@v4
2014
2028
if : matrix.os == 'Windows'
2015
2029
with :
2016
2030
name : windows-vfs-overlay-${{ matrix.arch }}
2017
2031
path : ${{ github.workspace }}/BinaryCache/swift/stdlib
2018
- - uses : actions/ download-artifact@v4
2032
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2019
2033
with :
2020
- name : macros-amd64
2034
+ name : macros-Windows- amd64
2021
2035
path : ${{ github.workspace }}/BinaryCache/Library
2036
+
2022
2037
- uses : actions/checkout@v4
2023
2038
with :
2024
2039
repository : apple/swift-corelibs-libdispatch
@@ -2397,17 +2412,17 @@ jobs:
2397
2412
with :
2398
2413
name : compilers-Windows-${{ inputs.build_arch }}
2399
2414
path : ${{ github.workspace }}/BinaryCache/Library
2400
- - uses : actions/ download-artifact@v4
2415
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2401
2416
with :
2402
- name : Windows- stdlib-${{ matrix.arch }}
2417
+ name : stdlib-Windows -${{ matrix.arch }}
2403
2418
path : ${{ github.workspace }}/BinaryCache/Library
2404
2419
- uses : actions/download-artifact@v4
2405
2420
with :
2406
2421
name : Windows-sdk-${{ matrix.arch }}
2407
2422
path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
2408
- - uses : actions/ download-artifact@v4
2423
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2409
2424
with :
2410
- name : macros-amd64
2425
+ name : macros-Windows- amd64
2411
2426
path : ${{ github.workspace }}/BinaryCache/Library
2412
2427
- uses : thebrowsercompany/gha-download-tar-artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2413
2428
with :
@@ -2546,9 +2561,9 @@ jobs:
2546
2561
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
2547
2562
2548
2563
# Download host libraries for the windows amd64 host, after moving the target libraries to the target-specific directory.
2549
- - uses : actions/ download-artifact@v4
2564
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
2550
2565
with :
2551
- name : Windows- stdlib-amd64
2566
+ name : stdlib-Windows -amd64
2552
2567
path : ${{ github.workspace }}/BinaryCache/Library
2553
2568
- uses : actions/download-artifact@v4
2554
2569
with :
@@ -3108,9 +3123,9 @@ jobs:
3108
3123
name : devtools-amd64
3109
3124
path : ${{ github.workspace }}/BuildRoot/Library
3110
3125
- name : Download stdlib
3111
- uses : actions/ download-artifact@v4
3126
+ uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
3112
3127
with :
3113
- name : Windows- stdlib-${{ matrix.arch }}
3128
+ name : stdlib-Windows -${{ matrix.arch }}
3114
3129
path : ${{ github.workspace }}/BuildRoot/Library
3115
3130
- name : Download SDK
3116
3131
uses : actions/download-artifact@v4
@@ -3148,9 +3163,9 @@ jobs:
3148
3163
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
3149
3164
3150
3165
# Download host SDK on top of the target SDK, so that the runtime DLLs are the host ones.
3151
- - uses : actions/ download-artifact@v4
3166
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
3152
3167
with :
3153
- name : Windows- stdlib-amd64
3168
+ name : stdlib-Windows -amd64
3154
3169
path : ${{ github.workspace }}/BuildRoot/Library
3155
3170
- uses : actions/download-artifact@v4
3156
3171
with :
@@ -3248,9 +3263,9 @@ jobs:
3248
3263
path : ${{ github.workspace }}/BuildRoot/Library
3249
3264
3250
3265
- name : Download Macros
3251
- uses : actions/ download-artifact@v4
3266
+ uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
3252
3267
with :
3253
- name : macros-${{ matrix.arch }}
3268
+ name : macros-Windows- ${{ matrix.arch }}
3254
3269
path : ${{ github.workspace }}/BuildRoot/Library
3255
3270
3256
3271
- uses : actions/checkout@v4
@@ -3421,9 +3436,9 @@ jobs:
3421
3436
platform : x86
3422
3437
3423
3438
steps :
3424
- - uses : actions/ download-artifact@v4
3439
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
3425
3440
with :
3426
- name : Windows- stdlib-${{ matrix.arch }}
3441
+ name : stdlib-Windows -${{ matrix.arch }}
3427
3442
path : ${{ github.workspace }}/BuildRoot/Library
3428
3443
- uses : actions/download-artifact@v4
3429
3444
with :
@@ -3530,9 +3545,9 @@ jobs:
3530
3545
triple_no_api_level : x86_64-unknown-linux-android
3531
3546
3532
3547
steps :
3533
- - uses : actions/ download-artifact@v4
3548
+ - uses : thebrowsercompany/gha- download-tar- artifact@717214c9da2a52b3407a5b0a1f31c00b8fde5681
3534
3549
with :
3535
- name : Android- stdlib-${{ matrix.arch }}
3550
+ name : stdlib-Android -${{ matrix.arch }}
3536
3551
path : ${{ github.workspace }}/BuildRoot/Library
3537
3552
- uses : actions/download-artifact@v4
3538
3553
with :
0 commit comments