-
-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (36 loc) · 1.03 KB
/
build_and_test.yaml
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
name: build_and_test
on:
pull_request:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
os: [ubuntu-24.04]
compiler: [g++-12, g++-14, clang++-14, clang++-17]
cpp_standard: [20]
build_type: [Debug, Release]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build lld gcc-12 gcc-14 clang-14 clang-17
sudo ln -sf /usr/local/bin/ld /usr/bin/lld
- name: Configure CMake
run: |
cmake . -DKELCORO_ENABLE_TESTING=ON \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
-DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \
-B build -G "Ninja"
- name: Build
run:
cmake --build build
- name: Test
run: |
cd build
ctest --output-on-failure -C ${{matrix.build_type}} -V