-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (50 loc) · 1.81 KB
/
debian-coverage.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
# SPDX-FileCopyrightText: 2021-2024 The Ikarus Developers [email protected]
# SPDX-License-Identifier: CC0-1.0
name: CodeCoverage
on:
push:
paths-ignore:
- 'docs/**'
- '.github/workflows/ghpages.yml'
- '.github/workflows/createDockerContainer.yml'
- '**.md'
pull_request:
types: [opened]
branches:
- main
paths-ignore:
- 'docs/**'
- '.github/workflows/ghpages.yml'
- '.github/workflows/createDockerContainer.yml'
- '**.md'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
Clang-Debug-CodeCov:
runs-on: ubuntu-latest
container:
image: ikarusproject/ikarus-dev:latest
options: --memory-swap="20g" --memory="20g" --cpus="2" --user root
steps:
- uses: actions/checkout@v2
- name: Build
run: |
mkdir $HOME/profiles/
mkdir cmake-build-debug-coverage
cd cmake-build-debug-coverage
cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -GNinja -DENABLE_TEST_COVERAGE=1
cmake --build . --parallel 2 --target ikarus
cmake --build . --parallel 2 --target build_cpp_tests
- name: Tests
working-directory: ./cmake-build-debug-coverage
run: |
ctest --output-on-failure --parallel 2 -C Debug -L cpp_quick
cd ..
llvm-cov-16 gcov $(find ./cmake-build-debug-coverage -not -path "*dune-env/*" -type f -name "*.gcno" | sed 's/gcno//g')
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)