-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.72 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Test
on: [ push ]
jobs:
main:
strategy:
matrix:
name: [
Ubuntu | Clang,
Ubuntu | GCC,
Windows Server,
]
include:
- name: Ubuntu | Clang
os: ubuntu-latest
cc: clang
cxx: clang++
- name: Ubuntu | GCC
os: ubuntu-latest
cc: gcc
cxx: g++
- name: Windows Server
os: windows-latest
cc: cl
cxx: cl
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Create the build directory
run: cmake -E make_directory ${{ runner.workspace }}/build
- name: Configure CMake
shell: bash
working-directory: ${{ runner.workspace }}/build
run: |
cmake \
-D CMAKE_C_COMPILER=${{ matrix.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
$GITHUB_WORKSPACE
- name: Build (debug)
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --build . --config Debug
- name: Test (debug)
working-directory: ${{ runner.workspace }}/build
shell: bash
run: ctest -C Debug --output-on-failure
- name: Build (release)
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --build . --config Release
- name: Test (release)
working-directory: ${{ runner.workspace }}/build
shell: bash
run: ctest -C Release --output-on-failure