Skip to content

System Refactor

System Refactor #947

name: msvc
on:
push:
branches:
- 'main'
- 'ci/cache'
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'LICENSE'
workflow_dispatch:
pull_request:
jobs:
build:
name: ci-windows-msvc-19
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Visual Studio Environment
uses: ilammy/[email protected]
- name: Install ccache
uses: hendrikmuhs/[email protected]
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Cache Conan packages
id: cache-conan
uses: actions/[email protected]
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Configure python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: python -m pip install -r .github/requirements.txt
- name: Configure Conan profile
run: conan profile detect --force --name msvc-19
- name: Install Conan dependencies
run: |
conan install conanfile.txt -r conancenter -pr:b msvc-19 -pr:h msvc-19 -s compiler.cppstd=20 -s build_type=Debug -c tools.cmake.cmaketoolchain:generator=Ninja --build=missing
- name: Configure CMake
run: |
cmake -S . --preset=windows-msvc-debug -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\build\Debug\generators\conan_toolchain.cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=cl.exe -DBUILD_TESTING:BOOL=ON -DUSE_STD_FORMAT:BOOL=ON -DUSE_SYSTEM_DEPENDENCIES:BOOL=ON
- name: Build
run: cmake --build --preset=windows-msvc-debug
- name: Test
run: ctest --preset=windows-msvc-debug