-
Notifications
You must be signed in to change notification settings - Fork 7
88 lines (83 loc) · 2.63 KB
/
cpp-ci.yml
File metadata and controls
88 lines (83 loc) · 2.63 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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: C++ CI
on:
pull_request:
merge_group:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
CMAKE_BUILD_PARALLEL_LEVEL: 3
CTEST_PARALLEL_LEVEL: 4
jobs:
cpp-ubuntu-latest:
name: cpp-ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ${{ matrix.config.toolchain }}
- name: Build
run: cmake --build build --config Debug
- name: Test
run: ctest -C Debug --output-on-failure --test-dir build --repeat until-pass:3 --timeout 750
cpp-macos-latest:
name: cpp-macos-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ${{ matrix.config.toolchain }}
- name: Build
run: cmake --build build --config Debug
- name: Test
run: ctest -C Debug --output-on-failure --test-dir build --repeat until-pass:3 --timeout 750
cpp-windows-latest:
name: cpp-windows-latest
runs-on: windows-latest
needs: cpp-macos-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ${{ matrix.config.toolchain }}
- name: Build
run: cmake --build build --config Debug
- name: Test
run: ctest -C Debug --output-on-failure --test-dir build --repeat until-pass:3 --timeout 750
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: cpp-ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DENABLE_COVERAGE=ON
- name: Build
run: cmake --build build --config Debug --target rail_test
- name: Test
run: ctest -C Debug --output-on-failure --test-dir build --repeat until-pass:3 --timeout 750
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
gcov: true
gcov_ignore: "extern/**/*"
token: ${{ secrets.CODECOV_TOKEN }}