• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Build and Test CI - Windows
2# Build and Test CI for windows-latest
3
4on: [ push, pull_request ]
5
6jobs:
7  build:
8    name: ${{ matrix.config.name }}
9    runs-on: ${{ matrix.config.os }}
10    strategy:
11      fail-fast: true
12      matrix:
13        config:
14          # <Windows-latest, Release Build, Cl compiler toolchain, Visual Studio 17 2022 generator>
15          - name: "windows latest cl rel visual studio 17 2022 with deps"
16            os: windows-latest
17            build_type: Release
18            cc: cl
19            cxx: cl
20            cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_BUILD_DEPS=1 -DUHDR_ENABLE_WERROR=1'
21
22    steps:
23    - name: Checkout the repository
24      uses: actions/checkout@v4
25
26    - name: Setup cmake
27      uses: jwlawson/actions-setup-cmake@v2
28
29    - name: Configure CMake
30      shell: bash
31      run: |
32        export CC=${{ matrix.config.cc }}
33        export CXX=${{ matrix.config.cxx }}
34        mkdir build
35        cmake -G "Visual Studio 17 2022" -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} ${{ matrix.config.cmake-opts }}
36
37    - name: Build
38      run: cmake --build build --config ${{ matrix.config.build_type }}
39
40    - name: Test
41      working-directory: build
42      run: ctest --build-config ${{ matrix.config.build_type }}