|
111 | 111 | required: true
|
112 | 112 | type: string
|
113 | 113 |
|
| 114 | + swift_testing_revision: |
| 115 | + required: true |
| 116 | + type: string |
| 117 | + |
114 | 118 | swift_toolchain_sqlite_revision:
|
115 | 119 | required: true
|
116 | 120 | type: string
|
@@ -1506,6 +1510,12 @@ jobs:
|
1506 | 1510 | ref: ${{ inputs.swift_foundation_revision }}
|
1507 | 1511 | path: ${{ github.workspace }}/SourceCache/swift-foundation
|
1508 | 1512 | show-progress: false
|
| 1513 | + - uses: actions/checkout@v4 |
| 1514 | + with: |
| 1515 | + repository: swiftlang/swift-testing |
| 1516 | + ref: ${{ inputs.swift_testing_revision }} |
| 1517 | + path: ${{ github.workspace }}/SourceCache/swift-testing |
| 1518 | + show-progress: false |
1509 | 1519 |
|
1510 | 1520 | # NOTE(compnerd): we execute unconditionally as we use CMake from VSDevEnv
|
1511 | 1521 | - uses: compnerd/gha-setup-vsdevenv@main
|
@@ -1544,8 +1554,29 @@ jobs:
|
1544 | 1554 | - name: Build Foundation Macros
|
1545 | 1555 | run: cmake --build ${{ github.workspace }}/BinaryCache/swift-foundation-macros
|
1546 | 1556 |
|
| 1557 | + - name: Configure Testing Macros |
| 1558 | + run: | |
| 1559 | + $WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml |
| 1560 | + $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe |
| 1561 | +
|
| 1562 | + cmake -B ${{ github.workspace }}/BinaryCache/swift-testing-macros ` |
| 1563 | + -D CMAKE_BUILD_TYPE=Release ` |
| 1564 | + -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr ` |
| 1565 | + -D CMAKE_Swift_COMPILER=${SWIFTC} ` |
| 1566 | + -D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} ` |
| 1567 | + -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 }}" ` |
| 1568 | + -D CMAKE_SYSTEM_NAME=Windows ` |
| 1569 | + -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} ` |
| 1570 | + -G Ninja ` |
| 1571 | + -S ${{ github.workspace }}/SourceCache/swift-testing/Sources/TestingMacros ` |
| 1572 | + -D SwiftSyntax_DIR=${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules |
| 1573 | + - name: Build Testing Macros |
| 1574 | + run: cmake --build ${{ github.workspace }}/BinaryCache/swift-testing-macros |
| 1575 | + |
1547 | 1576 | - name: Install Foundation Macros
|
1548 | 1577 | run: cmake --build ${{ github.workspace }}/BinaryCache/swift-foundation-macros --target install
|
| 1578 | + - name: Install Testing Macros |
| 1579 | + run: cmake --build ${{ github.workspace }}/BinaryCache/swift-testing-macros --target install |
1549 | 1580 |
|
1550 | 1581 | - name: Upload macros
|
1551 | 1582 | uses: actions/upload-artifact@v4
|
@@ -1700,6 +1731,11 @@ jobs:
|
1700 | 1731 | with:
|
1701 | 1732 | name: compilers-amd64
|
1702 | 1733 | path: ${{ github.workspace }}/BinaryCache/Library
|
| 1734 | + - name: Download swift-syntax |
| 1735 | + uses: actions/download-artifact@v4 |
| 1736 | + with: |
| 1737 | + name: swift-syntax-${{ matrix.arch }} |
| 1738 | + path: ${{ github.workspace }}/BinaryCache/swift-syntax |
1703 | 1739 | - uses: actions/download-artifact@v4
|
1704 | 1740 | with:
|
1705 | 1741 | name: ${{ matrix.os }}-stdlib-${{ matrix.arch }}
|
@@ -1777,6 +1813,12 @@ jobs:
|
1777 | 1813 | ref: ${{ inputs.swift_corelibs_xctest_revision }}
|
1778 | 1814 | path: ${{ github.workspace }}/SourceCache/swift-corelibs-xctest
|
1779 | 1815 | show-progress: false
|
| 1816 | + - uses: actions/checkout@v4 |
| 1817 | + with: |
| 1818 | + repository: swiftlang/swift-testing |
| 1819 | + ref: ${{ inputs.swift_testing_revision }} |
| 1820 | + path: ${{ github.workspace }}/SourceCache/swift-testing |
| 1821 | + show-progress: false |
1780 | 1822 |
|
1781 | 1823 | - run: |
|
1782 | 1824 | $RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
|
@@ -1973,6 +2015,53 @@ jobs:
|
1973 | 2015 | run: |
|
1974 | 2016 | cmake --build ${{ github.workspace }}/BinaryCache/xctest
|
1975 | 2017 |
|
| 2018 | + - name: extract swift-syntax |
| 2019 | + run: | |
| 2020 | + $module = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules/SwiftSyntaxConfig.cmake" |
| 2021 | + $bindir = cygpath -m ${{ github.workspace }}/BinaryCache/swift-syntax |
| 2022 | + (Get-Content $module).Replace('<BINARY_DIR>', "${bindir}") | Set-Content $module |
| 2023 | +
|
| 2024 | + - name: Configure Testing |
| 2025 | + run: | |
| 2026 | + # Workaround CMake 3.20 issue |
| 2027 | + $CLANG_CL = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/clang-cl.exe |
| 2028 | + $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe |
| 2029 | +
|
| 2030 | + $NDKPATH = cygpath -m ${{ steps.setup-ndk.outputs.ndk-path }} |
| 2031 | +
|
| 2032 | + $WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml |
| 2033 | + $OVERLAY_FLAGS = if ("${{ matrix.os }}" -eq "Windows") { |
| 2034 | + "-vfsoverlay ${WINDOWS_VFS_OVERLAY} -strict-implicit-module-context -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules" |
| 2035 | + } else { |
| 2036 | + "" |
| 2037 | + } |
| 2038 | +
|
| 2039 | + $CMAKE_CPU = if ("${{ matrix.cpu }}" -eq "armv7") { "armv7-a" } else { "${{ matrix.cpu }}" } |
| 2040 | +
|
| 2041 | + cmake -B ${{ github.workspace }}/BinaryCache/testing ` |
| 2042 | + -D BUILD_SHARED_LIBS=YES ` |
| 2043 | + -D CMAKE_BUILD_TYPE=Release ` |
| 2044 | + -D CMAKE_BUILD_WITH_INSTALL_RPATH=YES ` |
| 2045 | + -D CMAKE_Swift_COMPILER=${SWIFTC} ` |
| 2046 | + -D CMAKE_Swift_FLAGS="-resource-dir ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/lib/swift -L${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/lib/swift/${{ matrix.os }} ${OVERLAY_FLAGS} ${{ matrix.swiftflags }}" ` |
| 2047 | + -D CMAKE_Swift_FLAGS_RELEASE="-O" ` |
| 2048 | + -D CMAKE_SYSTEM_NAME=${{ matrix.os }} ` |
| 2049 | + -D CMAKE_SYSTEM_PROCESSOR=${CMAKE_CPU} ` |
| 2050 | + ${{ matrix.linker_flags }} ` |
| 2051 | + ${{ matrix.extra_flags }} ` |
| 2052 | + -D CMAKE_ANDROID_NDK=${NDKPATH} ` |
| 2053 | + -D SWIFT_ANDROID_NDK_PATH=${NDKPATH} ` |
| 2054 | + -G Ninja ` |
| 2055 | + -S ${{ github.workspace }}/SourceCache/swift-testing ` |
| 2056 | + -D SwiftSyntax_DIR=${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules ` |
| 2057 | + -D SwiftTesting_MACRO=${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/SwiftTesting.dll |
| 2058 | + - name: Build Testing |
| 2059 | + run: | |
| 2060 | + cmake --build ${{ github.workspace }}/BinaryCache/testing |
| 2061 | +
|
| 2062 | + - name: Install Testing |
| 2063 | + run: | |
| 2064 | + cmake --build ${{ github.workspace }}/BinaryCache/testing --target install |
1976 | 2065 | - name: Install xctest
|
1977 | 2066 | run: |
|
1978 | 2067 | cmake --build ${{ github.workspace }}/BinaryCache/xctest --target install
|
|
0 commit comments