Skip to content

Commit e26a69c

Browse files
committed
Added github workflow
1 parent e9dcca3 commit e26a69c

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/build_and_test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'feat/*'
7+
- 'fix/*'
8+
pull_request:
9+
branches: ["master"]
10+
11+
env:
12+
BUILD_TYPE: Release
13+
14+
jobs:
15+
compiler_matrix:
16+
runs-on: ubuntu-24.04
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
cxx_standard: [14, 17, 20]
21+
compiler:
22+
- pkg: g++-14
23+
cxx: g++-14
24+
- pkg: g++-13
25+
cxx: g++-13
26+
- pkg: g++-12
27+
cxx: g++-12
28+
- pkg: g++-11
29+
cxx: g++-11
30+
- pkg: clang-18
31+
cxx: clang++-18
32+
- pkg: clang-17
33+
cxx: clang++-17
34+
- pkg: clang-16
35+
cxx: clang++-16
36+
37+
steps:
38+
- name: Add universe repository
39+
run: sudo add-apt-repository universe
40+
41+
- name: Update apt
42+
run: sudo apt-get update
43+
44+
- name: Do install
45+
run: sudo apt-get install -y ${{ matrix.compiler.pkg }} cmake ninja-build libgtest-dev
46+
47+
- name: Checkout
48+
uses: actions/checkout@v2
49+
50+
- name: CMake Configure
51+
run: cmake -B ${{github.workspace}}/build -G"Ninja" -DINT_TREE_ENABLE_TESTS=on -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }}
52+
53+
- name: Build
54+
run: cmake --build ${{github.workspace}}/build
55+
56+
- name: Test
57+
working-directory: ${{github.workspace}}/build
58+
run: ./tests/tree-tests

0 commit comments

Comments
 (0)