name: build-win-vcpkg on: # push: # branches: [ master ] # pull_request: # branches: [ master ] workflow_dispatch: inputs: ctestArgs: description: 'CTest arguments' env: BUILD_TYPE: Release VCPKG_DEFAULT_TRIPLET: x64-windows # NOTE: The default is "x86-windows" jobs: build: runs-on: windows-2025 steps: - uses: actions/checkout@v6 with: submodules: true - name: Install deps run: vcpkg install fontconfig freetype libxml2 openssl libjpeg-turbo libpng tiff zlib - name: Configure CMake run: cmake -B ${{github.workspace}}\build -S . -A x64 -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} # NOTE1: The cmake build is forced to be single # configuration (either Debug or Release) but it # must be specified when running tests on Windows # because of MSVC solution oddities # NOTE2: vcpkg is installed in C:\vcpkg as per Github # documentation, but VCPKG_INSTALLATION_ROOT variable # doesn't seem to be defined # https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md - name: Build run: cmake --build ${{github.workspace}}\build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}\build run: ctest ${{ github.event.inputs.ctestArgs }}