add if consexpr as suggested by the NSVC to VCL #29
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: Build and Unittest | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
example_matrix: | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: symbitic/install-cmake@master | |
- name: CMake Configure and Build on Ubuntu | |
if: matrix.os == 'Ubuntu-latest' | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: CMake Configure and Build on Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
shell: cmd | |
#- name: Test | |
# working-directory: ${{github.workspace}}/build | |
# # Execute tests defined by the CMake configuration. | |
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
# run: ctest -C ${{env.BUILD_TYPE}} | |