Skip to content

feat: add best-effort support for Windows #29

feat: add best-effort support for Windows

feat: add best-effort support for Windows #29

Workflow file for this run

name: Build and Test (vcpkg)
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build and Test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
triplet: x64-windows-release
- os: macos-latest
triplet: arm64-osx-release
- os: ubuntu-24.04
triplet: x64-linux-release
runs-on: ${{ matrix.os }}
permissions:
contents: read
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.triplet }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
submodules: true
- name: Set up cmake and ninja
uses: lukka/get-cmake@582a9f5c6f4f332f36797e1ac757d1c8850a1513 # v3.30.4
- name: Set up vcpkg
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
- name: Build
run: |
cmake -B build --toolchain vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build
- name: Test
run: ctest --test-dir build
- name: Install
run: sudo cmake --install build
if: runner.os != 'Windows'
- name: Install (Windows)
run: cmake --install build --config Debug
if: runner.os == 'Windows'
- name: Smoke test (build)
run: |
cmake -B build --toolchain ../vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build
working-directory: ci
- name: Smoke test (run)
run: |
./ci-cmake
./ci-pkgconfig
working-directory: ci/build
if: runner.os != 'Windows'
- name: Smoke test (run)
run: |
.\ci-cmake.exe
working-directory: ci/build/Debug
if: runner.os == 'Windows'