-
Notifications
You must be signed in to change notification settings - Fork 15
70 lines (62 loc) · 2.13 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# SPDX-FileCopyrightText: 2021 Philipp Basler, Margarete Mühlleitner and Jonas Müller
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: codecov CI
on:
push:
branches: [ master]
paths:
- '**.cpp'
- '**.c'
- '**.h'
- '**.hpp'
- '**CMakeLists.txt'
- 'conanfile.py'
pull_request:
branches: [ master, develop ]
paths:
- '**.cpp'
- '**.c'
- '**.h'
- '**.hpp'
- '**CMakeLists.txt'
- 'conanfile.py'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name : installPackages
run : sudo apt-get update && sudo apt-get install --no-install-recommends --yes lcov
- uses: actions/setup-python@v5
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install conan
run: pip install conan>2
- run: python3 Setup.py --options EnableCoverage=True CompileBaryo=True UseVectorization=False --build-missing
- name: Set cmake preset name
run: python3 .github/GetProfile.py
- run: cmake --preset $GeneratedCMakeProfile
- name: compile
run: cmake --build --preset $GeneratedCMakeProfile -j${{ steps.cpu-cores.outputs.count }}
- name: Generate Coverage
run: cmake --build --preset $GeneratedCMakeProfile -j${{ steps.cpu-cores.outputs.count }} -t coverage
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.BSMPT_CODECOV_UPLOAD_TOKEN }}
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)