Update windows-build.yml #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Build | |
on: | |
push: | |
branches: | |
- experimental | |
pull_request: | |
branches: | |
- experimental | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Set VCPKG env | |
run: | | |
echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV | |
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache Qt | |
uses: actions/cache@v4 | |
with: | |
path: '${{ env.TEMP }}\qt' | |
key: windows-qt-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: | | |
windows-qt- | |
- name: Install Qt 6.8.3 | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: '6.8.3' | |
target: 'desktop' | |
dir: '${{ env.TEMP }}\qt' | |
arch: 'win64_msvc2022_64' | |
- name: Cache CMake dependencies | |
uses: actions/cache@v4 | |
with: | |
path: build/.cmake | |
key: windows-cmake-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: | | |
windows-cmake- | |
- name: Update VCPKG Baseline | |
run: | | |
& "C:\vcpkg\vcpkg.exe" x-update-baseline | |
- name: Build with CMake | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release | |
cmake --build . --config Release |