Skip to content

Commit 15f1d72

Browse files
committed
GHA: adjust the XCTest and Testing CMake invocations
Bring this in line with the build.ps1 equivalent, removing the file shuffling post-installation.
1 parent 1703c3f commit 15f1d72

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

.github/workflows/swift-toolchain.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,8 @@ jobs:
23392339
-S ${{ github.workspace }}/SourceCache/swift-corelibs-xctest `
23402340
-D dispatch_DIR=${{ github.workspace }}/BinaryCache/libdispatch/cmake/modules `
23412341
-D Foundation_DIR=${{ github.workspace }}/BinaryCache/foundation/cmake/modules `
2342-
-D ENABLE_TESTING=NO
2342+
-D ENABLE_TESTING=NO `
2343+
-D XCTest_INSTALL_NESTED_SUBDIR=YES
23432344
- name: Build xctest
23442345
if: matrix.os != 'Android' || inputs.build_android
23452346
run: |
@@ -2402,6 +2403,7 @@ jobs:
24022403
-S ${{ github.workspace }}/SourceCache/swift-testing `
24032404
-D dispatch_DIR=${{ github.workspace }}/BinaryCache/libdispatch/cmake/modules `
24042405
-D Foundation_DIR=${{ github.workspace }}/BinaryCache/foundation/cmake/modules `
2406+
-D SwiftTesting_INSTALL_NESTED_SUBDIR=YES `
24052407
-D SwiftTesting_MACRO=${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/TestingMacros.dll
24062408
- name: Build Testing
24072409
if: matrix.os != 'Android' || inputs.build_android
@@ -2412,24 +2414,10 @@ jobs:
24122414
if: matrix.os != 'Android' || inputs.build_android
24132415
run: |
24142416
cmake --build ${{ github.workspace }}/BinaryCache/testing --target install
2415-
- name: Testing Install Fixup
2416-
if: matrix.os != 'Android' || inputs.build_android
2417-
run: |
2418-
$OS = "${{ matrix.os }}".ToLowerInvariant()
2419-
$LIB = if ("${{ matrix.os }}" -eq "Windows") { "Testing.lib" } else { "libTesting.so" }
2420-
New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-${{ inputs.swift_version }}/usr/lib/swift/${OS}/${{ matrix.cpu }}" -Force -ErrorAction Ignore | Out-Null
2421-
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-${{ inputs.swift_version }}/usr/lib/swift/${OS}/${LIB}" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-${{ inputs.swift_version }}/usr/lib/swift/${OS}/${{ matrix.cpu }}/"
24222417
- name: Install xctest
24232418
if: matrix.os != 'Android' || inputs.build_android
24242419
run: |
24252420
cmake --build ${{ github.workspace }}/BinaryCache/xctest --target install
2426-
- name: XCTest Install Fixup
2427-
if: matrix.os != 'Android' || inputs.build_android
2428-
run: |
2429-
$OS = "${{ matrix.os }}".ToLowerInvariant()
2430-
$LIB = if ("${{ matrix.os }}" -eq "Windows") { "XCTest.lib" } else { "libXCTest.so" }
2431-
New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-${{ inputs.swift_version }}/usr/lib/swift/${OS}/${{ matrix.cpu }}" -Force -ErrorAction Ignore | Out-Null
2432-
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-${{ inputs.swift_version }}/usr/lib/swift/${OS}/${LIB}" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-${{ inputs.swift_version }}/usr/lib/swift/${OS}/${{ matrix.cpu }}/"
24332421
- name: Install foundation
24342422
if: matrix.os != 'Android' || inputs.build_android
24352423
run: |

0 commit comments

Comments
 (0)