-
Notifications
You must be signed in to change notification settings - Fork 15
58 lines (48 loc) · 1.43 KB
/
build_and_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
name: Build & Test
on:
push:
branches:
- 'feat/*'
- 'fix/*'
pull_request:
branches: ["master"]
env:
BUILD_TYPE: Release
jobs:
compiler_matrix:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
cxx_standard: [14, 17, 20]
compiler:
- pkg: g++-14
cxx: g++-14
- pkg: g++-13
cxx: g++-13
- pkg: g++-12
cxx: g++-12
- pkg: g++-11
cxx: g++-11
- pkg: clang-18
cxx: clang++-18
- pkg: clang-17
cxx: clang++-17
- pkg: clang-16
cxx: clang++-16
steps:
- name: Add universe repository
run: sudo add-apt-repository universe
- name: Update apt
run: sudo apt-get update
- name: Do install
run: sudo apt-get install -y ${{ matrix.compiler.pkg }} cmake ninja-build libgtest-dev libgmock-dev
- name: Checkout
uses: actions/checkout@v2
- name: CMake Configure
run: cmake -B ${{github.workspace}}/build -G"Ninja" -DINT_TREE_BUILD_EXAMPLES=on -DINT_TREE_ENABLE_TESTS=on -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }}
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: ./tests/tree-tests