vcpkg test #2
This file contains 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: Universal test | |
on: | |
workflow_dispatch: | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022, windows-2019, ubuntu-24.04, ubuntu-22.04] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- 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: print vcpkg environment variables | |
shell: bash | |
run: | | |
echo VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT | |
echo VCPKG_BINARY_SOURCES=$VCPKG_BINARY_SOURCES | |
echo ACTIONS_CACHE_URL=$ACTIONS_CACHE_URL | |
echo ACTIONS_RUNTIME_TOKEN=$ACTIONS_RUNTIME_TOKEN | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/compcmake | |
shell: bash | |
run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake | |
- name: Test | |
uses: threeal/[email protected] | |
with: | |
test-dir: ${{github.workspace}}/compcmake/build | |
verbose: true | |
build-config: Debug |