-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.47 KB
/
linux.yml
File metadata and controls
41 lines (39 loc) · 1.47 KB
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: Linux
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
build_type: [Release]
cpp_compiler: [g++, clang++]
cxx_std: [17, 20, 23]
steps:
- uses: actions/checkout@v5
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_BUILD_TESTS=TRUE \
-DCMAKE_BUILD_EXAMPLES=TRUE \
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --parallel
- name: Run Tests
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --test-dir tests/ --output-on-failure --parallel
- name: Run Examples
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ./examples/examples