-
Notifications
You must be signed in to change notification settings - Fork 25
66 lines (53 loc) · 1.75 KB
/
codecov-upload.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
60
61
62
63
64
65
66
name: CodeCov
on: [push, pull_request, workflow_dispatch]
jobs:
codecov:
name: CodeCov
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
run: |
sudo apt update
sudo apt upgrade
sudo apt-get install build-essential automake autoconf autoconf-archive texinfo libtool-bin yasm ninja-build ccache
- name: Setup GCC
uses: pkgxdev/setup@v1
with:
+: gcc@13
- run: gcc --version
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22
- name: Configure
run: cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -D ENABLE_COVERAGE:BOOL=TRUE -S . -B build
- name: Build
run: cmake --build build -j 2
- name: Test
working-directory: build
continue-on-error: true
run: ctest --rerun-failed --output-on-failure -j 2
# - name: collect code coverage
# run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- name: Generate coverage info
working-directory: build
continue-on-error: true
run: |
mkdir gcov-reports
pushd gcov-reports
for f in `find ../tests/CMakeFiles/CDT_test.dir -name '*.o'`; do
echo "Processing $f file..."
gcov -o ${f} x
done
ls | wc -l
popd
- name: Submit to codecov.io
uses: codecov/codecov-action@v3
with:
# directory: build/gcov-reports
fail_ci_if_error: false
verbose: true
gcov: true