Merge pull request #543 from laurynas-biveinis/win-cmake-genex-fixes #772
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: msvc-build | |
on: [push] | |
jobs: | |
build: | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: MSVC Release | |
preset: "msvc-release" | |
# FIXME(laurynas): Google Test 1.12.1 gets an ASan error on printing | |
# some of the test names | |
# - name: MSVC Release with ASan | |
# preset: "msvc-release-asan" | |
- name: MSVC Debug | |
preset: "msvc-debug" | |
# - name: MSVC Debug with ASan | |
# preset: "msvc-debug-asan" | |
- name: MSVC LLVM Release | |
preset: "msvc-llvm-release" | |
- name: MSVC LLVM Debug | |
preset: "msvc-llvm-debug" | |
- name: MSVC Debug without AVX2 | |
preset: "msvc-debug-no-avx2" | |
- name: MSVC Static Analysis Release | |
preset: "msvc-static-analysis-release" | |
- name: MSVC Static Analysis Debug | |
preset: "msvc-static-analysis-debug" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Boost | |
uses: MarkusJx/[email protected] | |
id: install-boost | |
with: | |
boost_version: 1.78.0 | |
platform_version: 2019 | |
toolset: msvc | |
- name: Setup command line tools | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.35 | |
- name: Configure CMake | |
run: cmake --preset "${{ matrix.preset }}" | |
env: | |
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
- name: Build | |
run: cmake --build --preset "${{ matrix.preset }}" | |
- name: Upload SARIF as an Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: sarif-file | |
path: "${{github.workspace}}\\build\\${{matrix.preset}}\\msvc.sarif" | |
if: > | |
always() | |
&& (matrix.preset == 'msvc-static-analysis-release' | |
|| matrix.preset == 'msvc-static-analysis-debug') | |
- name: Correctness test | |
run: ctest -V --preset "${{ matrix.preset }}" | |
if: > | |
(matrix.preset != 'msvc-static-analysis-release') | |
&& (matrix.preset != 'msvc-static-analysis-debug') | |
- name: Benchmark correctness test | |
run: | | |
$Env:P = "${{ matrix.preset }}" | |
cmake --build --preset "$env:P" --target quick_benchmarks | |
if: > | |
(matrix.preset != 'msvc-static-analysis-release') | |
&& (matrix.preset != 'msvc-static-analysis-debug') |