Skip to content

Commit 96c7ba3

Browse files
committed
GHA: correct SDKROOT handling
We were miscomputing the SDKROOT which would fail to find necessary modules when trying to build swift-inspect. Correct the computation and simplify the rules a small amount.
1 parent 4b0c6c5 commit 96c7ba3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/swift-toolchain.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,13 +2722,11 @@ jobs:
27222722
with:
27232723
name: compilers-amd64
27242724
path: ${{ github.workspace }}/BuildRoot/Library
2725-
27262725
- name: Download Devtools
27272726
uses: actions/download-artifact@v4
27282727
with:
27292728
name: devtools-amd64
27302729
path: ${{ github.workspace }}/BuildRoot/Library
2731-
27322730
- uses: actions/download-artifact@v4
27332731
with:
27342732
name: Windows-sdk-amd64
@@ -2752,12 +2750,9 @@ jobs:
27522750
name: cmark-gfm-arm64-0.29.0.gfm.13
27532751
path: ${{ github.workspace }}/BuildRoot/Library/cmark-gfm-0.29.0.gfm.13/usr
27542752

2755-
- name: Copy Windows SDK (AMD64) to BuildRoot
2756-
run: Copy-Item -Recurse -Force -Path ${{ github.workspace }}/BinaryCache/* -Destination ${{ github.workspace }}/BuildRoot/
2757-
27582753
- name: Update environment variables
27592754
run: |
2760-
$SDKRoot = cygpath -w "${{ github.workspace }}/BuildRoot/Developer/SDKs/Windows.sdk"
2755+
$SDKRoot = cygpath -w "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk"
27612756
echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
27622757
27632758
$ToolchainPath = cygpath -w "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin"
@@ -2768,8 +2763,6 @@ jobs:
27682763
echo "${RTLPath}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
27692764
27702765
- run: |
2771-
$env:SDKROOT="${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk"
2772-
27732766
Move-Item ${env:SDKROOT}/usr/lib/swift/dispatch ${env:SDKROOT}/usr/include/
27742767
Move-Item ${env:SDKROOT}/usr/lib/swift/os ${env:SDKROOT}/usr/include/
27752768
Move-Item ${env:SDKROOT}/usr/lib/swift/Block ${env:SDKROOT}/usr/include/
@@ -2786,6 +2779,7 @@ jobs:
27862779
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
27872780
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
27882781
2782+
27892783
- name: Checkout apple/swift
27902784
uses: actions/checkout@v4
27912785
with:

0 commit comments

Comments
 (0)