|
10 | 10 | jobs: |
11 | 11 | windows-test-build-release: |
12 | 12 | runs-on: windows-latest |
13 | | - strategy: |
14 | | - matrix: |
15 | | - include: |
16 | | - - tag: 5.7-RELEASE |
17 | | - branch: swift-5.7-release |
18 | 13 | steps: |
19 | | - - uses: actions/checkout@master |
| 14 | + - uses: compnerd/gha-setup-swift@main |
20 | 15 | with: |
21 | | - fetch-depth: 1 |
22 | | - - uses: seanmiddleditch/gha-setup-vsdevenv@master |
| 16 | + branch: swift-5.8-release |
| 17 | + tag: 5.8-RELEASE |
23 | 18 |
|
24 | | - - name: Install pkg-conf |
25 | | - shell: pwsh |
26 | | - run: | |
27 | | - vcpkg install --triplet x64-windows pkgconf |
28 | | - echo "PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
29 | | - echo "PKG_CONFIG_PATH=C:\vcpkg\installed\x64-windows\lib\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
30 | | - $env:Path += ";C:\vcpkg\installed\x64-windows\tools\pkgconf\" |
31 | | - pkgconf --version |
32 | | -
|
33 | | - - name: Install SDL2 + Vulkan |
34 | | - shell: pwsh |
35 | | - run: vcpkg install sdl2[core,vulkan] --recurse --triplet x64-windows |
| 19 | + - name: Checkout |
| 20 | + uses: actions/checkout@v3.5.2 |
36 | 21 |
|
37 | | - - name: Install Swift ${{ matrix.tag }} |
38 | | - run: | |
39 | | - Install-Binary -Url "https://swift.org/builds/${{ matrix.branch }}/windows10/swift-${{ matrix.tag }}/swift-${{ matrix.tag }}-windows10.exe" -Name "installer.exe" -ArgumentList ("-q") |
40 | | - |
41 | | - - name: Set Environment Variables |
42 | | - run: | |
43 | | - echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
44 | | - echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
45 | | - |
46 | | - - name: Adjust Paths |
47 | | - run: | |
48 | | - echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
49 | | - echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
50 | | - |
51 | | - - name: Install Supporting Files |
52 | | - run: | |
53 | | - Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap" |
54 | | - Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap" |
55 | | - Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes" |
56 | | - Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap" |
| 22 | + - name: Cache vcpkg |
| 23 | + uses: actions/cache@v3.3.1 |
| 24 | + with: |
| 25 | + key: windows-x64-vcpkg |
| 26 | + path: C:/vcpkg/ |
57 | 27 |
|
58 | | - - name: Generate shims |
| 28 | + - name: Build & Test |
59 | 29 | shell: pwsh |
60 | 30 | run: | |
61 | | - $env:Path += ";C:\vcpkg\installed\x64-windows\tools\pkgconf\" # required to be set there! |
62 | | - ./genshim.ps1 |
| 31 | + # install dependencies |
| 32 | + vcpkg install sdl2[core,vulkan] pkgconf --recurse --triplet x64-windows |
| 33 | + vcpkg integrate install |
| 34 | + |
| 35 | + # setup pkgconf environment |
| 36 | + $env:Path += ";C:\vcpkg\installed\x64-windows\tools\pkgconf\" |
| 37 | + $env:PKG_CONFIG_PATH=$VCPKG_DIR+'\installed\x64-windows\tools\pkgconf\;C:\vcpkg\packages\sdl2_x64-windows\debug\lib\pkgconfig\' |
63 | 38 |
|
64 | | - - name: Build Debug & Release |
65 | | - run: | |
| 39 | + # build |
66 | 40 | swift build |
67 | | - swift build -c release |
68 | | -
|
69 | | - - name: Copy libs |
70 | | - shell: pwsh |
71 | | - run: | |
72 | | - $env:Path += ";C:\vcpkg\installed\x64-windows\tools\pkgconf\" # required to be set there! |
73 | | - ./copylibs.ps1 |
74 | 41 |
|
75 | | - - name: Test |
76 | | - run: swift test -v --skip-update --parallel --enable-test-discovery |
| 42 | + # test |
| 43 | + swift test |
| 44 | + |
0 commit comments