-
Notifications
You must be signed in to change notification settings - Fork 30
47 lines (37 loc) · 1.28 KB
/
codecov.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
name: "Codecov"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run:
name: Codecov
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Build
run: |
brew install gcc@14 lcov ninja binutils
brew link --force binutils
cmake -E make_directory ${{runner.workspace}}/build
cd ${{runner.workspace}}/build
cmake ${GITHUB_WORKSPACE} -GNinja -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_CXX_FLAGS="--coverage" -DCMAKE_EXE_LINKER_FLAGS="--coverage"
cmake --build .
- name: Run tests
working-directory: ${{runner.workspace}}/build
run: ctest
- name: Generate coverage report
working-directory: ${{runner.workspace}}/build/test/CMakeFiles/test-flux.dir
run: |
lcov --directory . --capture --gcov gcov-14 --output-file coverage.info
lcov --remove coverage.info '*/test/*' --output-file coverage.info
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
files: ${{runner.workspace}}/build/test/CMakeFiles/test-flux.dir/coverage.info
token: ${{secrets.CODECOV_TOKEN}}
verbose: true