Skip to content

Commit 84194f8

Browse files
authored
Fix up Testing/XCTest/DS2 install paths (#914)
1 parent 4cef249 commit 84194f8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Diff for: .github/workflows/swift-toolchain.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ jobs:
431431
cxxflags: ${{ inputs.ANDROID_CMAKE_CXX_FLAGS }}
432432
os: Android
433433
extra_flags: -DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
434+
module_triple: aarch64-unknown-linux-android
434435

435436
- arch: armv7
436437
cc: clang
@@ -439,6 +440,7 @@ jobs:
439440
cxxflags: ${{ inputs.ANDROID_CMAKE_CXX_FLAGS }}
440441
os: Android
441442
extra_flags: -DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a
443+
module_triple: armv7-unknown-linux-androideabi
442444

443445
- arch: i686
444446
cc: clang
@@ -447,6 +449,7 @@ jobs:
447449
cxxflags: ${{ inputs.ANDROID_CMAKE_CXX_FLAGS }}
448450
os: Android
449451
extra_flags: -DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=x86
452+
module_triple: i686-unknown-linux-android
450453

451454
- arch: x86_64
452455
cc: clang
@@ -455,6 +458,7 @@ jobs:
455458
cxxflags: ${{ inputs.ANDROID_CMAKE_CXX_FLAGS }}
456459
os: Android
457460
extra_flags: -DCMAKE_ANDROID_API=${{ inputs.ANDROID_API_LEVEL }} -DCMAKE_ANDROID_ARCH_ABI=x86_64
461+
module_triple: x86_64-unknown-linux-android
458462

459463
name: ${{ matrix.os }} ${{ matrix.arch }} ds2
460464

@@ -507,8 +511,9 @@ jobs:
507511
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} `
508512
-D CMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" `
509513
-D MSVC_C_ARCHITECTURE_ID=${{ matrix.arch }} `
514+
-D DS2_PROGRAM_PREFIX="${{ matrix.module_triple }}-" `
510515
-D DS2_REGSGEN2=${{ github.workspace }}/BinaryCache/RegsGen2/regsgen2.exe `
511-
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BinaryCache/Library/Developer `
516+
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BinaryCache/Library/Developer/ds2/usr `
512517
-D CMAKE_SYSTEM_NAME=${{ matrix.os }} `
513518
-D CMAKE_ANDROID_NDK=$NDKPATH `
514519
${{ matrix.extra_flags }} `
@@ -2411,8 +2416,9 @@ jobs:
24112416
if: matrix.os != 'Android' || inputs.build_android
24122417
run: |
24132418
$OS = "${{ matrix.os }}".ToLowerInvariant()
2419+
$Lib = if ("${{ matrix.os }}" -eq "Windows") { "Testing.lib" } else { "libTesting.so" }
24142420
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
2415-
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"
2421+
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-development/usr/lib/swift/${OS}/${Lib}" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/Testing-development/usr/lib/swift/${OS}/${{ matrix.cpu }}/${Lib}"
24162422
- name: Install xctest
24172423
if: matrix.os != 'Android' || inputs.build_android
24182424
run: |
@@ -2421,9 +2427,10 @@ jobs:
24212427
if: matrix.os != 'Android' || inputs.build_android
24222428
run: |
24232429
$OS = "${{ matrix.os }}".ToLowerInvariant()
2430+
$Lib = if ("${{ matrix.os }}" -eq "Windows") { "XCTest.lib" } else { "libXCTest.so" }
24242431
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
24252432
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
2426-
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"
2433+
Move-Item -Path "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/${LIB}" "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/Library/XCTest-development/usr/lib/swift/${OS}/${{ matrix.cpu }}/${Lib}"
24272434
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"
24282435
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"
24292436
- name: Install foundation
@@ -3646,7 +3653,7 @@ jobs:
36463653
if: inputs.build_android
36473654
with:
36483655
name: Android-${{ matrix.arch }}-ds2
3649-
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/Library/${{ matrix.triple_no_api_level }}
3656+
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Android.platform/Developer/Library
36503657

36513658
- uses: actions/checkout@v4
36523659
if: inputs.build_android

0 commit comments

Comments
 (0)