-
-
Notifications
You must be signed in to change notification settings - Fork 24
67 lines (57 loc) · 1.64 KB
/
cmake.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
name: Linux Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: ${{matrix.cxx}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cxx:
- g++-10
- g++-11
- g++-12
- clang++-12
- clang++-13
- clang++-14
include:
- cxx: g++-10
compiler: g++-10
- cxx: g++-11
compiler: g++-11
- cxx: g++-12
compiler: g++-12
- cxx: clang++-12
compiler: clang++-12
- cxx: clang++-13
compiler: clang++-13
- cxx: clang++-14
compiler: clang++-14
env:
CXX: ${{matrix.cxx}}
CMAKE_PREFIX_PATH: ${{github.workspace}}/.local
steps:
- uses: actions/checkout@v2
- name: Prepare compiler
run: sudo apt-get install -y ${{matrix.compiler}}
- name: Install catch2
run: |
git clone --branch v2.x https://github.com/catchorg/Catch2
cmake -S Catch2 -B Catch2/build -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=$CMAKE_PREFIX_PATH
cmake --build Catch2/build --target install
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build
- name: Test
run: cmake --build build --target test
- name: Install
run: cmake --install build --prefix $CMAKE_PREFIX_PATH
- name: Configure CMake for examples
run: cmake -S examples -B examples/build -DCMAKE_BUILD_TYPE=Release
- name: Build examples
run: cmake --build examples/build