Skip to content

Commit 9cd897d

Browse files
authored
CI: Simplify the Windows CI rules (#93)
Rely on compnerd/gha-setup-swift to install and configure Swift rather than manually doing so. This reduces the complexity of the CI configuration.
1 parent 0e0df6f commit 9cd897d

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

.github/workflows/tests_windows.yaml

+4-22
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,10 @@ jobs:
99
name: windows
1010
runs-on: windows-latest
1111
steps:
12-
- uses: seanmiddleditch/gha-setup-vsdevenv@v3
13-
14-
- name: Install Swift 5.4
15-
run: |
16-
Install-Binary -Url "https://swift.org/builds/swift-5.4.2-release/windows10/swift-5.4.2-RELEASE/swift-5.4.2-RELEASE-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
17-
18-
- name: Set Environment Variables
19-
run: |
20-
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
21-
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
22-
23-
- name: Adjust Paths
24-
run: |
25-
echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
26-
echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
27-
28-
- name: Install Supporting Files
29-
run: |
30-
Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap"
31-
Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap"
32-
Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes"
33-
Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap"
12+
- uses: compnerd/gha-setup-swift@main
13+
with:
14+
branch: swift-5.4.3-release
15+
tag: 5.4.3-RELEASE
3416

3517
- name: Swift version
3618
run: swift --version

0 commit comments

Comments
 (0)