@@ -2277,6 +2277,13 @@ jobs:
2277
2277
2278
2278
$CMAKE_CPU = if ("${{ matrix.cpu }}" -eq "armv7") { "armv7-a" } else { "${{ matrix.cpu }}" }
2279
2279
2280
+ $XCTestBinDir = switch ("${{ matrix.cpu }}") {
2281
+ "armv7" { "bin32a" }
2282
+ "i686" { "bin32" }
2283
+ "x86_64" { "bin64" }
2284
+ "aarch64" { "bin64a" }
2285
+ }
2286
+
2280
2287
cmake -B ${{ github.workspace }}/BinaryCache/xctest `
2281
2288
-D BUILD_SHARED_LIBS=YES `
2282
2289
-D CMAKE_BUILD_TYPE=Release `
@@ -2287,6 +2294,7 @@ jobs:
2287
2294
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} `
2288
2295
-D CMAKE_CXX_COMPILER_TARGET=${{ matrix.triple }} `
2289
2296
-D CMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" `
2297
+ -D CMAKE_INSTALL_BINDIR=$XCTestBinDir `
2290
2298
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr `
2291
2299
-D CMAKE_Swift_COMPILER=${SWIFTC} `
2292
2300
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple_no_api_level }} `
@@ -2335,13 +2343,21 @@ jobs:
2335
2343
2336
2344
$CMAKE_CPU = if ("${{ matrix.cpu }}" -eq "armv7") { "armv7-a" } else { "${{ matrix.cpu }}" }
2337
2345
2346
+ $TestingBinDir = switch ("${{ matrix.cpu }}") {
2347
+ "armv7" { "bin32a" }
2348
+ "i686" { "bin32" }
2349
+ "x86_64" { "bin64" }
2350
+ "aarch64" { "bin64a" }
2351
+ }
2352
+
2338
2353
cmake -B ${{ github.workspace }}/BinaryCache/testing `
2339
2354
-D BUILD_SHARED_LIBS=YES `
2340
2355
-D CMAKE_BUILD_TYPE=Release `
2341
2356
-D CMAKE_BUILD_WITH_INSTALL_RPATH=YES `
2342
2357
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} `
2343
2358
-D CMAKE_CXX_COMPILER_TARGET=${{ matrix.triple }} `
2344
2359
-D CMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" `
2360
+ -D CMAKE_INSTALL_BINDIR=$TestingBinDir `
2345
2361
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-development/usr `
2346
2362
-D CMAKE_Swift_COMPILER=${SWIFTC} `
2347
2363
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple_no_api_level }} `
@@ -2367,10 +2383,25 @@ jobs:
2367
2383
if : matrix.os != 'Android' || inputs.build_android
2368
2384
run : |
2369
2385
cmake --build ${{ github.workspace }}/BinaryCache/testing --target install
2386
+ - name : Testing Install Fixup
2387
+ if : matrix.os != 'Android' || inputs.build_android
2388
+ run : |
2389
+ $OS = "${{ matrix.os }}".ToLowerInvariant()
2390
+ New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-development/usr/lib/swift/${OS}/${{ matrix.cpu }}" -Force -ErrorAction Ignore | Out-Null
2391
+ Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-development/usr/lib/swift/${OS}/Testing.lib" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-development/usr/lib/swift/${OS}/${{ matrix.cpu }}/Testing.lib"
2370
2392
- name : Install xctest
2371
2393
if : matrix.os != 'Android' || inputs.build_android
2372
2394
run : |
2373
2395
cmake --build ${{ github.workspace }}/BinaryCache/xctest --target install
2396
+ - name : XCTest Install Fixup
2397
+ if : matrix.os != 'Android' || inputs.build_android
2398
+ run : |
2399
+ $OS = "${{ matrix.os }}".ToLowerInvariant()
2400
+ New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/${{ matrix.cpu }}" -Force -ErrorAction Ignore | Out-Null
2401
+ New-Item -ItemType Directory -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/XCTest.swiftmodule" -Force -ErrorAction Ignore | Out-Null
2402
+ Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/XCTest.lib" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/${{ matrix.cpu }}/XCTest.lib"
2403
+ Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/${{ matrix.cpu }}/XCTest.swiftdoc" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/XCTest.swiftmodule/${{ matrix.triple_no_api_level }}.swiftdoc"
2404
+ Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/${{ matrix.cpu }}/XCTest.swiftmodule" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/XCTest.swiftmodule/${{ matrix.triple_no_api_level }}.swiftmodule"
2374
2405
- name : Install foundation
2375
2406
if : matrix.os != 'Android' || inputs.build_android
2376
2407
run : |
0 commit comments