Skip to content

ci: add Github actions #11

ci: add Github actions

ci: add Github actions #11

Workflow file for this run

name: Test on Windows
on:
push:
branches:
- main
- ci/**
pull_request:
branches:
- main
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
cppstd: ['17', '20', '23']
build-type: [Debug, Release]
exclude:
- os: windows-2019
cppstd: '23'
include:
- os: windows-2019
msvc-version: 142
- os: windows-2022
msvc-version: 143
- build-type: Debug
cmake-preset: conan-debug
- build-type: Release
cmake-preset: conan-release
name: MSVC ${{ matrix.msvc-version }} - C++${{ matrix.cppstd }} - ${{ matrix.build-type }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Setup Conan
run: |
conan --version
conan profile detect
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Install dependencies
run: >
conan install .
-s compiler.cppstd=${{ matrix.cppstd }}
-s build_type=${{ matrix.build-type }}
-b missing
- name: CMake Configure
run: |
cmake --list-presets
cmake --preset conan-default
- name: Build
run: |
cmake --build --list-presets
cmake --build --preset ${{ matrix.cmake-preset }}
- name: Test
run: |
ctest --list-presets
ctest --preset ${{ matrix.cmake-preset }}