Skip to content

Fixed missing cmake qt functions. #352

Fixed missing cmake qt functions.

Fixed missing cmake qt functions. #352

Workflow file for this run

name: Windows build & tests
on: [push, pull_request, workflow_dispatch]
env:
BUILD_TYPE: Release # Change build type here.
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_ROOT: '${{ github.workspace }}/vcpkg'
jobs:
build:
runs-on: windows-latest # Change Windows version here.
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.2.4 # Update Qt version here.
aqtversion: '>=0.9.7'
modules: 'qtimageformats'
- name: Prepare dependencies
shell: cmd
run: |
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Build
shell: bash
run: |
cd build
cmake .. -A x64
cmake --build . --config $BUILD_TYPE --target Degate
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- name: Tests
shell: bash
run: |
cd build
cmake .. -DBUILD_TESTS=1
cmake --build . --config $BUILD_TYPE --target DegateTests
# Windeployqt is sooo broken when using vcpkg...
# ./vcpkg_installed/x64-windows/tools/Qt6/bin/windeployqt.exe ./tests/out/bin/$BUILD_TYPE
# mkdir -p tests/out/bin/$BUILD_TYPE/imageformats
# find . -name vcpkg_installed/x64-windows-degate/Qt6/plugins/imageformats/*.dll -exec cp {} tests/out/bin/$BUILD_TYPE/imageformats/ \;
cd tests/out/bin/$BUILD_TYPE
$Qt6_DIR/bin/windeployqt.exe ./
./DegateTests.exe
- name: Upload vcpkg build logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'vcpkg-buildlogs-${{ matrix.triplet }}'
path: ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log