Debian Codegraph @

podofo/.github/workflows/build-win-vcpkg.yml

raw
1 name: build-win-vcpkg
2
3 on:
4 # push:
5 # branches: [ master ]
6 # pull_request:
7 # branches: [ master ]
8 workflow_dispatch:
9 inputs:
10 ctestArgs:
11 description: 'CTest arguments'
12
13 env:
14 BUILD_TYPE: Release
15 VCPKG_DEFAULT_TRIPLET: x64-windows
16 # NOTE: The default is "x86-windows"
17
18 jobs:
19 build:
20 runs-on: windows-2025
21
22 steps:
23 - uses: actions/checkout@v6
24 with:
25 submodules: true
26
27 - name: Install deps
28 run: vcpkg install fontconfig freetype libxml2 openssl libjpeg-turbo libpng tiff zlib
29
30 - name: Configure CMake
31 run: cmake -B ${{github.workspace}}\build -S . -A x64 -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
32
33 # NOTE1: The cmake build is forced to be single
34 # configuration (either Debug or Release) but it
35 # must be specified when running tests on Windows
36 # because of MSVC solution oddities
37 # NOTE2: vcpkg is installed in C:\vcpkg as per Github
38 # documentation, but VCPKG_INSTALLATION_ROOT variable
39 # doesn't seem to be defined
40 # https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md
41
42 - name: Build
43 run: cmake --build ${{github.workspace}}\build --config ${{env.BUILD_TYPE}}
44
45 - name: Test
46 working-directory: ${{github.workspace}}\build
47 run: ctest ${{ github.event.inputs.ctestArgs }}