Add a CMake test for 32-bit build on x86_64 to guard DeepState build #983
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] | |
permissions: { } | |
jobs: | |
build: | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: MSVC Debug | |
preset: "msvc-debug" | |
- name: MSVC Release | |
preset: "msvc-release" | |
- name: MSVC Debug w/ ASan | |
preset: "msvc-debug-asan" | |
- name: MSVC Release w/ ASan | |
preset: "msvc-release-asan" | |
- name: MSVC LLVM Debug | |
preset: "msvc-llvm-debug" | |
- name: MSVC LLVM Release | |
preset: "msvc-llvm-release" | |
- name: MSVC Debug without AVX2 | |
preset: "msvc-debug-no-avx2" | |
# MSVC static analysis false positive regression in 17.11: | |
# optimistic_lock.hpp(171) : warning C26493: Don't use C-style casts | |
# (type.4). | |
# - name: MSVC Static Analysis Debug | |
# preset: "msvc-static-analysis-debug" | |
# - name: MSVC Static Analysis Release | |
# preset: "msvc-static-analysis-release" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Boost | |
uses: MarkusJx/[email protected] | |
id: install-boost | |
with: | |
boost_version: 1.78.0 | |
platform_version: 2019 | |
toolset: msvc | |
cache: false | |
- name: Setup command line tools | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.42 | |
- name: Configure CMake | |
run: | | |
# Ensure that we use clang-cl from MSVC, not LLVM | |
$env:path = $env:path -split ';' -notmatch 'C:\\Program Files\\LLVM\\bin' -join ';' | |
cmake --preset "${{ matrix.preset }}" | |
env: | |
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
- name: Build | |
run: | | |
cmake --build --preset "${{ matrix.preset }}" | |
$SARIF_SRC = "${{github.workspace}}\build\${{matrix.preset}}\msvc.sarif" | |
$SARIF_DST = "${{github.workspace}}\build\$($env:matrix.preset)\msvc-${{matrix.preset}}.sarif" | |
Move-Item -Path $SARIF_SRC -Destination $SARIF_DST -ErrorAction SilentlyContinue | |
- name: Upload SARIF as an Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sarif-file | |
path: "${{github.workspace}}\\build\\${{matrix.preset}}\\msvc-${{matrix.preset}}.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') |