Fix C++ version detection for MSVC (#1342) #4849
This file contains hidden or 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: C++ compatibility build | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-unix: | |
| name: 'Unix C++${{ matrix.cxx-version }}' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cxx-version: [14, 17, 20] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup | |
| run: cmake -B build/ -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.cxx-version}} | |
| - name: Build | |
| run: cmake --build build/ | |
| - name: Test | |
| run: ./build/test/test_xsimd | |
| build-msvc: | |
| name: 'MSVC C++${{ matrix.cxx-version }}' | |
| defaults: | |
| run: | |
| shell: bash {0} | |
| runs-on: windows-2022 | |
| strategy: | |
| matrix: | |
| cxx-version: [14, 17, 20] | |
| steps: | |
| - name: Setup compiler | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: amd64 | |
| - name: Setup Ninja | |
| run: | | |
| python3 -m pip install --upgrade pip setuptools wheel | |
| python3 -m pip install ninja | |
| - uses: actions/checkout@v6 | |
| - name: Setup | |
| run: cmake -B build/ -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.cxx-version}} -G Ninja | |
| - name: Build | |
| run: cmake --build build/ | |
| - name: Test | |
| run: ./build/test/test_xsimd | |