-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (96 loc) · 2.77 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
env:
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
build-ubuntu:
name: Build and test ${{ matrix.buildtype }} on ${{ matrix.os }} with ${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
compiler: [g++-7, g++-8, g++-9, g++-10]
buildtype: [Debug, Release]
steps:
- name: bootstrap
run: sudo apt install ${{ matrix.compiler }} valgrind cppcheck clang-tidy
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }}
cmake --build .
- name: test
run: ctest
working-directory: build
build-mac:
name: Build and test ${{ matrix.buildtype }} on ${{ matrix.os }} with ${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
compiler: [g++-11, clang++, llvm11]
buildtype: [Debug, Release]
include:
- os: macos-latest
compiler: g++-11
cxx: g++-11
package: gcc@11
- os: macos-latest
compiler: clang++
cxx: clang++
- os: macos-latest
compiler: llvm11
cxx: /usr/local/opt/llvm@11/bin/clang++
package: llvm@11
steps:
- name: bootstrap
if: ${{ matrix.package != '' }}
run: brew install ${{ matrix.package }}
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }}
cmake --build .
- name: test
run: ctest
working-directory: build
build-win:
name: Build and test ${{ matrix.buildtype }} on ${{ matrix.os }} with ${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
compiler: [VS2019]
buildtype: [Debug, Release]
include:
- os: windows-latest
compiler: VS2019
generator: Visual Studio 16 2019
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
mkdir build
cd build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }}
cmake --build . --config ${{ matrix.buildtype }}
shell: cmd
- name: test
run: cmake --build . --target RUN_TESTS --config ${{ matrix.buildtype }}
working-directory: build
shell: cmd