-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (55 loc) · 1.69 KB
/
ccpp.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
59
name: C/C++ CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure with CMake
run: cmake -DBUILD_TEST:bool=ON -S . -B build_cmake
- name: Build (CMake)
run: cmake --build build_cmake
- name: Run tests (CMake)
run: cd build_cmake && ctest && cd ..
clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure with CMake
run: cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DBUILD_TEST:bool=ON -S . -B build_cmake
- name: Build (CMake)
run: cmake --build build_cmake
- name: Run tests (CMake)
run: cd build_cmake && ctest && cd ..
coverage:
runs-on: ubuntu-latest
container: jeandet/simple_cxx_fedora
steps:
- uses: actions/checkout@v3
- name: update Meson
run: python3 -m pip install meson -U
- name: Configure with Meson
run: meson -Db_coverage=true . build
- name: Build (meson)
run: ninja -C build
- name: Run tests (meson)
run: ninja test -C build
- name: Generate Coverage repport
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info '*/catch.hpp' --output-file coverage.info
lcov --list coverage.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.info
flags: unittests
name: codecov-cdfpp
yml: ./codecov.yml
fail_ci_if_error: true