[CI] Fix Windows build env (#1977)

This commit is contained in:
David Chavez 2022-11-18 23:34:18 +01:00 committed by GitHub
parent dcd9ca56e6
commit 79d8e37cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 12 deletions

View File

@ -223,30 +223,23 @@ jobs:
readme.txt
build-windows:
needs: extract-assets
runs-on: windows-latest
runs-on: [self-hosted, Windows, x64]
steps:
- name: Install dependencies
run: |
choco install ninja
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force
- uses: actions/checkout@v3
with:
submodules: true
- name: ccache
uses: dcvz/ccache-action@27b9f33213c0079872f064f6b6ba0233dfa16ba2
with:
key: ${{ runner.os }}-ccache
- name: Restore assets
uses: actions/download-artifact@v3
with:
name: assets
- uses: ilammy/msvc-dev-cmd@v1
- name: Setup 7-Zip
run: |
"C:\Program Files\7-Zip" >> $env:GITHUB_PATH
- name: Build SoH
run: |
7z x assets.zip -aoa
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
cmake -S . -B build-windows -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake -S . -B build-windows -G "Visual Studio 17 2022" -T v142 -A x64 -DCMAKE_BUILD_TYPE:STRING=Release
cmake --build build-windows --target OTRGui --config Release --parallel 10
cmake --build build-windows --config Release --parallel 10
cd build-windows