-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.13 KB
/
test.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
name: Test
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
target:
- ubuntu-gcc
- ubuntu-clang
- macOS-clang
c-standard:
- "99"
- "11"
build-type:
- Debug
- Release
include:
- target: ubuntu-gcc
os: ubuntu-latest
cc: gcc
- target: ubuntu-clang
os: ubuntu-latest
cc: clang
- target: macOS-clang
os: macOS-latest
cc: clang
name: "Test - ${{ matrix.target }}, c-standard: ${{ matrix.c-standard }}, build-type: ${{ matrix.build-type }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: cmake -B "${{github.workspace}}/build" -DCMAKE_C_STANDARD="${{ matrix.c-standard }}" -DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" -DCMAKE_C_COMPILER="${{ matrix.cc }}" -DEXAMPLE=on
- run: cmake --build "${{github.workspace}}/build" --config "${{ matrix.build-type }}"
- run: ctest -C "${{ matrix.build-type }}" --verbose
working-directory: ${{github.workspace}}/build