Skip to content

* .github/workflows/windows-cmake.yml: Set APR_ROOT and APRUtil_ROOT. #26

* .github/workflows/windows-cmake.yml: Set APR_ROOT and APRUtil_ROOT.

* .github/workflows/windows-cmake.yml: Set APR_ROOT and APRUtil_ROOT. #26

Workflow file for this run

name: Windows (CMake)
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "trunk" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [windows-latest]
build-type: [Debug, Release]
triplet:
- x64-windows
- x86-windows
generator: [ "Visual Studio 17 2022" ]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
- 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 dependencies
run: vcpkg install --triplet ${{ matrix.triplet }} apr apr-util zlib
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.generator }}" -DCMAKE_INSTALL_PREFIX=C:/vcpkg/installed/${{ matrix.triplet }} -DAPR_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} -DAPRUtil_ROOT=C:/vcpkg/installed/${{ matrix.triplet }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{ matrix.build-type }} --output-on-failure