-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.67 KB
/
test_cxx20.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: test-cxx20
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
build_type: [Release, RelWithDebInfo, MinSizeRel]
os: [windows-latest, ubuntu-latest, macos-latest]
compiler: [[clang, clang++], [gcc, g++]]
include:
- build_type: Release
os: windows-latest
compiler: [cl, cl]
- build_type: RelWithDebInfo
os: windows-latest
compiler: [cl, cl]
- build_type: MinSizeRel
os: windows-latest
compiler: [cl, cl]
env:
proj_type: ${{ (matrix.os == 'windows-latest' && matrix.compiler[0] != 'cl') && '-G "MinGW Makefiles"' || '' }}
steps:
- uses: actions/checkout@v4
- name: set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: configure CMake
run: >
cmake ${{ env.proj_type }}
-B ${{ github.workspace }}/build -S ${{ github.workspace }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_C_COMPILER=${{ matrix.compiler[0] }}
-DCMAKE_CXX_COMPILER=${{ matrix.compiler[1] }}
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
- name: build
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }}
- name: test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --verbose --output-on-failure --build-config ${{ matrix.build_type }} --parallel 8