Skip to content

Commit 22ca2a4

Browse files
authored
Add Windows CI job (jpsim#282)
1 parent 682d498 commit 22ca2a4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/swiftpm.yml

+28
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,31 @@ jobs:
4646
- uses: actions/checkout@v2
4747
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
4848
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
49+
50+
Windows:
51+
runs-on: windows-latest
52+
steps:
53+
- uses: actions/checkout@v2
54+
- uses: seanmiddleditch/gha-setup-vsdevenv@master
55+
- name: Install swift-DEVELOPMENT-SNAPSHOT-2020-10-29-a
56+
run: |
57+
Install-Binary -Url "https://swift.org/builds/development/windows10/swift-DEVELOPMENT-SNAPSHOT-2020-10-29-a/swift-DEVELOPMENT-SNAPSHOT-2020-10-29-a-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
58+
- name: Set Environment Variables
59+
run: |
60+
echo "::set-env name=SDKROOT::C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk"
61+
echo "::set-env name=DEVELOPER_DIR::C:\Library\Developer"
62+
- name: Adjust Paths
63+
run: |
64+
echo "::add-path::C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin"
65+
- name: Install Supporting Files
66+
shell: cmd
67+
run: |
68+
copy "%SDKROOT%\usr\share\ucrt.modulemap" "%UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt\module.modulemap"
69+
copy "%SDKROOT%\usr\share\visualc.modulemap" "%VCToolsInstallDir%\include\module.modulemap"
70+
copy "%SDKROOT%\usr\share\visualc.apinotes" "%VCToolsInstallDir%\include\visualc.apinotes"
71+
copy "%SDKROOT%\usr\share\winsdk.modulemap" "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap"
72+
- name: Build
73+
run: swift build -v
74+
- name: Test
75+
# TODO: Run all tests when this test runner crash is fixed: https://bugs.swift.org/browse/SR-13819
76+
run: swift test -v --filter testBinary

0 commit comments

Comments
 (0)