@@ -1487,9 +1487,145 @@ jobs:
1487
1487
symbolsFolder : ${{ github.workspace }}/BinaryCache
1488
1488
searchPattern : ' **/*.dll'
1489
1489
1490
+ macros :
1491
+ needs : [context, compilers, cmark_gfm, stdlib]
1492
+ runs-on : ${{ needs.context.outputs.windows_build_runner }}
1493
+
1494
+ strategy :
1495
+ fail-fast : false
1496
+ matrix :
1497
+ include :
1498
+ - arch : ' amd64'
1499
+ cpu : ' x86_64'
1500
+ triple : ' x86_64-unknown-windows-msvc'
1501
+
1502
+ - arch : ' arm64'
1503
+ cpu : ' aarch64'
1504
+ triple : ' aarch64-unknown-windows-msvc'
1505
+
1506
+ name : Windows ${{ matrix.arch }} Macros
1507
+
1508
+ steps :
1509
+ - name : Download Compilers
1510
+ uses : actions/download-artifact@v4
1511
+ with :
1512
+ name : compilers-amd64
1513
+ path : ${{ github.workspace }}/BinaryCache/Library
1514
+ - name : Download swift-syntax
1515
+ uses : actions/download-artifact@v4
1516
+ with :
1517
+ name : swift-syntax-${{ matrix.arch }}
1518
+ path : ${{ github.workspace }}/BinaryCache/swift-syntax
1519
+ - uses : actions/download-artifact@v4
1520
+ with :
1521
+ name : Windows-stdlib-${{ matrix.arch }}
1522
+ path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
1523
+ - uses : actions/download-artifact@v4
1524
+ if : matrix.arch == 'arm64'
1525
+ with :
1526
+ name : Windows-stdlib-amd64
1527
+ path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
1528
+ - uses : actions/download-artifact@v4
1529
+ with :
1530
+ name : windows-vfs-overlay-${{ matrix.arch }}
1531
+ path : ${{ github.workspace }}/BinaryCache/swift/stdlib
1532
+ - uses : actions/download-artifact@v4
1533
+ with :
1534
+ name : cmark-gfm-amd64-0.29.0.gfm.13
1535
+ path : ${{ github.workspace }}/BinaryCache/Library/cmark-gfm-0.29.0.gfm.13/usr
1536
+
1537
+ - name : cmark-gfm Setup
1538
+ run : Copy-Item ${{ github.workspace }}/BinaryCache/Library/cmark-gfm-0.29.0.gfm.13/usr/bin/*.dll ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/
1539
+
1540
+ - uses : actions/checkout@v4
1541
+ with :
1542
+ repository : apple/swift
1543
+ ref : ${{ needs.context.outputs.swift_revision }}
1544
+ path : ${{ github.workspace }}/SourceCache/swift
1545
+ show-progress : false
1546
+ - uses : actions/checkout@v4
1547
+ with :
1548
+ repository : apple/swift-foundation
1549
+ ref : ${{ needs.context.outputs.swift_foundation_revision }}
1550
+ path : ${{ github.workspace }}/SourceCache/swift-foundation
1551
+ show-progress : false
1552
+
1553
+ # NOTE(compnerd): we execute unconditionally as we use CMake from VSDevEnv
1554
+ - uses : compnerd/gha-setup-vsdevenv@main
1555
+ with :
1556
+ host_arch : amd64
1557
+ components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
1558
+ arch : ${{ matrix.arch }}
1559
+
1560
+ - run : |
1561
+ $RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
1562
+ echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1563
+
1564
+ - name : extract swift-syntax
1565
+ run : |
1566
+ $module = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules/SwiftSyntaxConfig.cmake"
1567
+ $bindir = cygpath -m ${{ github.workspace }}/BinaryCache/swift-syntax
1568
+ (Get-Content $module).Replace('<BINARY_DIR>', "${bindir}") | Set-Content $module
1569
+
1570
+ - name : Configure Foundation Macros
1571
+ run : |
1572
+ $WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml
1573
+ $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe
1574
+
1575
+ cmake -B ${{ github.workspace }}/BinaryCache/swift-foundation-macros `
1576
+ -D CMAKE_BUILD_TYPE=Release `
1577
+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr `
1578
+ -D CMAKE_Swift_COMPILER=${SWIFTC} `
1579
+ -D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
1580
+ -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 ${{ needs.context.otuputs.CMAKE_Swift_FLAGS }}" `
1581
+ -D CMAKE_Swift_FLAGS_RELEASE="-O" `
1582
+ -D CMAKE_SYSTEM_NAME=Windows `
1583
+ -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
1584
+ -G Ninja `
1585
+ -S ${{ github.workspace }}/SourceCache/swift-foundation/Sources/FoundationMacros `
1586
+ -D SwiftSyntax_DIR=${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules
1587
+ - name : Build Foundation Macros
1588
+ run : cmake --build ${{ github.workspace }}/BinaryCache/swift-foundation-macros
1589
+
1590
+ - name : Install Foundation Macros
1591
+ run : cmake --build ${{ github.workspace }}/BinaryCache/swift-foundation-macros --target install
1592
+
1593
+ - name : Upload macros
1594
+ uses : actions/upload-artifact@v4
1595
+ with :
1596
+ name : macros-${{ matrix.arch }}
1597
+ path : ${{ github.workspace }}/BuildRoot/Library
1598
+
1599
+ - name : Upload PDBs to Azure
1600
+
1601
+ if : ${{ needs.context.outputs.debug_info }}
1602
+ with :
1603
+ accountName : ${{ vars.SYMBOL_SERVER_ACCOUNT }}
1604
+ personalAccessToken : ${{ secrets.SYMBOL_SERVER_PAT }}
1605
+ symbolsFolder : ${{ github.workspace }}/BinaryCache/swift-foundation-macros
1606
+ searchPattern : ' **/*.pdb'
1607
+
1608
+ - name : Upload DLLs to Azure
1609
+
1610
+ if : ${{ needs.context.outputs.debug_info }}
1611
+ with :
1612
+ accountName : ${{ vars.SYMBOL_SERVER_ACCOUNT }}
1613
+ personalAccessToken : ${{ secrets.SYMBOL_SERVER_PAT }}
1614
+ symbolsFolder : ${{ github.workspace }}/BinaryCache/swift-foundation-macros
1615
+ searchPattern : ' **/*.dll'
1616
+
1617
+ - name : Upload EXEs to Azure
1618
+
1619
+ if : ${{ needs.context.outputs.debug_info }}
1620
+ with :
1621
+ accountName : ${{ vars.SYMBOL_SERVER_ACCOUNT }}
1622
+ personalAccessToken : ${{ secrets.SYMBOL_SERVER_PAT }}
1623
+ symbolsFolder : ${{ github.workspace }}/BinaryCache/swift-foundation-macros
1624
+ searchPattern : ' **/*.exe'
1625
+
1490
1626
sdk :
1491
1627
continue-on-error : ${{ matrix.arch != 'amd64' }}
1492
- needs : [context, libxml2, curl, zlib, compilers, cmark_gfm, stdlib]
1628
+ needs : [context, libxml2, curl, zlib, compilers, cmark_gfm, stdlib, macros ]
1493
1629
runs-on : ${{ needs.context.outputs.windows_build_runner }}
1494
1630
1495
1631
strategy :
@@ -1602,36 +1738,37 @@ jobs:
1602
1738
with :
1603
1739
name : zlib-${{ matrix.os }}-${{ matrix.arch }}-1.3
1604
1740
path : ${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr
1741
+
1605
1742
- name : Download Compilers
1606
1743
uses : actions/download-artifact@v4
1607
1744
with :
1608
1745
name : compilers-amd64
1609
- path : ${{ github.workspace }}/BuildRoot /Library
1746
+ path : ${{ github.workspace }}/BinaryCache /Library
1610
1747
- uses : actions/download-artifact@v4
1611
1748
with :
1612
- name : cmark-gfm-amd64-0.29.0.gfm.13
1613
- path : ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-0.29.0.gfm.13/usr
1614
-
1615
- - name : cmark-gfm Setup
1616
- run : Copy-Item ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-0.29.0.gfm.13/usr/bin/*.dll ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/
1617
-
1749
+ name : ${{ matrix.os }}-stdlib-${{ matrix.arch }}
1750
+ path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform
1618
1751
- uses : actions/download-artifact@v4
1619
1752
with :
1620
- name : ${{ matrix.os }}-stdlib-${{ matrix.arch }}
1621
- path : ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform
1622
-
1753
+ name : Windows-stdlib-amd64
1754
+ path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
1623
1755
- uses : actions/download-artifact@v4
1624
1756
if : matrix.os == 'Windows'
1625
1757
with :
1626
1758
name : windows-vfs-overlay-${{ matrix.arch }}
1627
- path : ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml
1628
-
1629
- - uses : actions/checkout@v4
1759
+ path : ${{ github.workspace }}/BinaryCache/swift/stdlib
1760
+ - uses : actions/download-artifact@v4
1630
1761
with :
1631
- repository : apple/swift-syntax
1632
- ref : ${{ needs.context.outputs.swift_syntax_revision }}
1633
- path : ${{ github.workspace }}/SourceCache/swift-syntax
1634
- show-progress : false
1762
+ name : macros-amd64
1763
+ path : ${{ github.workspace }}/BinaryCache/Library
1764
+ - uses : actions/download-artifact@v4
1765
+ with :
1766
+ name : cmark-gfm-amd64-0.29.0.gfm.13
1767
+ path : ${{ github.workspace }}/BinaryCache/Library/cmark-gfm-0.29.0.gfm.13/usr
1768
+
1769
+ - name : cmark-gfm Setup
1770
+ run : Copy-Item ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-0.29.0.gfm.13/usr/bin/*.dll ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/
1771
+
1635
1772
- uses : actions/checkout@v4
1636
1773
with :
1637
1774
repository : apple/swift-corelibs-libdispatch
@@ -1676,17 +1813,14 @@ jobs:
1676
1813
ref : ${{ needs.context.outputs.swift_corelibs_xctest_revision }}
1677
1814
path : ${{ github.workspace }}/SourceCache/swift-corelibs-xctest
1678
1815
show-progress : false
1679
- - uses : actions/checkout@v4
1680
- with :
1681
- repository : apple/swift-experimental-string-processing
1682
- ref : ${{ needs.context.outputs.swift_experimental_string_processing_revision }}
1683
- path : ${{ github.workspace }}/SourceCache/swift-experimental-string-processing
1684
- show-progress : false
1685
1816
1686
1817
- run : |
1687
1818
$RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Developer/SDKs/Windows.sdk/usr/bin
1688
1819
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1689
1820
1821
+ $SDKRoot = cygpath -w ${{ github.workspace }}/BinaryCache/Developer/SDKs/Windows.sdk
1822
+ echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
1823
+
1690
1824
# NOTE(compnerd): we execute unconditionally as we use CMake from VSDevEnv
1691
1825
- uses : compnerd/gha-setup-vsdevenv@main
1692
1826
with :
@@ -1717,7 +1851,6 @@ jobs:
1717
1851
1718
1852
$CMAKE_CPU = if ("${{ matrix.cpu }}" -eq "armv7") { "armv7-a" } else { "${{ matrix.cpu }}" }
1719
1853
1720
- Remove-Item env:\SDKROOT
1721
1854
cmake -B ${{ github.workspace }}/BinaryCache/libdispatch `
1722
1855
-D BUILD_SHARED_LIBS=YES `
1723
1856
-D CMAKE_BUILD_TYPE=Release `
@@ -1747,7 +1880,6 @@ jobs:
1747
1880
-D ENABLE_SWIFT=YES
1748
1881
- name : Build libdispatch
1749
1882
run : |
1750
- Remove-Item env:\SDKROOT
1751
1883
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch
1752
1884
1753
1885
- name : Configure Foundation
@@ -1771,7 +1903,6 @@ jobs:
1771
1903
1772
1904
$build_tools = if ("${{ matrix.os }}" -eq "Windows") { "YES" } else { "NO" }
1773
1905
1774
- Remove-Item env:\SDKROOT
1775
1906
cmake -B ${{ github.workspace }}/BinaryCache/foundation `
1776
1907
-D BUILD_SHARED_LIBS=YES `
1777
1908
-D CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL="/MD" `
@@ -1803,6 +1934,7 @@ jobs:
1803
1934
-D dispatch_DIR=${{ github.workspace }}/BinaryCache/libdispatch/cmake/modules `
1804
1935
-D CURL_DIR=${{ github.workspace }}/BuildRoot/Library/curl-8.9.1/usr/lib/cmake/CURL `
1805
1936
-D FOUNDATION_BUILD_TOOLS=${build_tools} `
1937
+ -D Foundation_MACRO=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin `
1806
1938
-D ENABLE_TESTING=NO `
1807
1939
-D _SwiftFoundation_SourceDIR=$SWIFT_FOUNDATION_SOURCE_DIR `
1808
1940
-D _SwiftFoundationICU_SourceDIR=$SWIFT_FOUNDATION_ICU_SOURCE_DIR `
@@ -1814,7 +1946,6 @@ jobs:
1814
1946
-D ZLIB_LIBRARY=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr/lib/$zlib_lib
1815
1947
- name : Build foundation
1816
1948
run : |
1817
- Remove-Item env:\SDKROOT
1818
1949
cmake --build ${{ github.workspace }}/BinaryCache/foundation
1819
1950
1820
1951
# TODO(compnerd) correctly version XCTest
@@ -1830,7 +1961,6 @@ jobs:
1830
1961
1831
1962
$CMAKE_CPU = if ("${{ matrix.cpu }}" -eq "armv7") { "armv7-a" } else { "${{ matrix.cpu }}" }
1832
1963
1833
- Remove-Item env:\SDKROOT
1834
1964
cmake -B ${{ github.workspace }}/BinaryCache/xctest `
1835
1965
-D BUILD_SHARED_LIBS=YES `
1836
1966
-D CMAKE_BUILD_TYPE=Release `
@@ -1860,20 +1990,16 @@ jobs:
1860
1990
-D ENABLE_TESTING=NO
1861
1991
- name : Build xctest
1862
1992
run : |
1863
- Remove-Item env:\SDKROOT
1864
1993
cmake --build ${{ github.workspace }}/BinaryCache/xctest
1865
1994
1866
1995
- name : Install xctest
1867
1996
run : |
1868
- Remove-Item env:\SDKROOT
1869
1997
cmake --build ${{ github.workspace }}/BinaryCache/xctest --target install
1870
1998
- name : Install foundation
1871
1999
run : |
1872
- Remove-Item env:\SDKROOT
1873
2000
cmake --build ${{ github.workspace }}/BinaryCache/foundation --target install
1874
2001
- name : Install libdispatch
1875
2002
run : |
1876
- Remove-Item env:\SDKROOT
1877
2003
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch --target install
1878
2004
1879
2005
- uses : actions/setup-python@v5
@@ -1952,7 +2078,7 @@ jobs:
1952
2078
with :
1953
2079
name : Windows-sdk-${{ matrix.arch }}
1954
2080
path : ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
1955
- - name : Downlaod swift-syntax
2081
+ - name : Download swift-syntax
1956
2082
uses : actions/download-artifact@v4
1957
2083
with :
1958
2084
name : swift-syntax-${{ matrix.arch }}
@@ -2761,7 +2887,7 @@ jobs:
2761
2887
2762
2888
package_tools :
2763
2889
name : Package Tools
2764
- needs : [context, compilers, debugging_tools, devtools]
2890
+ needs : [context, compilers, macros, debugging_tools, devtools]
2765
2891
runs-on : ${{ needs.context.outputs.windows_build_runner }}
2766
2892
2767
2893
strategy :
@@ -2788,6 +2914,12 @@ jobs:
2788
2914
name : devtools-${{ matrix.arch }}
2789
2915
path : ${{ github.workspace }}/BuildRoot/Library
2790
2916
2917
+ - name : Download Macros
2918
+ uses : actions/download-artifact@v4
2919
+ with :
2920
+ name : macros-${{ matrix.arch }}
2921
+ path : ${{ github.workspace }}/BuildRoot/Library
2922
+
2791
2923
- name : Download cmark-gfm
2792
2924
uses : actions/download-artifact@v4
2793
2925
with :
0 commit comments