FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppcheck/.github/workflows/coverage.yml at main · cppcheck-opensource/cppcheck · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cppcheck-opensource
/
cppcheck
Public
Notifications
You must be signed in to change notification settings
Fork
1.6k
Star
6.7k
Code
Pull requests
201
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
cppcheck
/
.github
/
workflows
/
coverage.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
71 lines (58 loc) · 2.02 KB
Breadcrumbs
cppcheck
/
.github
/
workflows
/
coverage.yml
Copy path
File metadata and controls
71 lines (58 loc) · 2.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
71
#
Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
#
Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name
:
Coverage
on
:
push
:
branches
:
-
'
main
'
-
'
releases/**
'
-
'
2.*
'
tags
:
-
'
2.*
'
pull_request
:
permissions
:
contents
:
read
jobs
:
build
:
runs-on
:
ubuntu-22.04
steps
:
-
uses
:
actions/checkout@v6
with
:
persist-credentials
:
false
-
name
:
ccache
uses
:
hendrikmuhs/ccache-action@v1.2
with
:
key
:
${{ github.workflow }}-${{ runner.os }}
-
name
:
Install missing software on ubuntu
run
:
|
sudo apt-get update
sudo apt-get install libxml2-utils lcov
-
name
:
Install missing Python packages on ubuntu
run
:
|
python -m pip install pip --upgrade
python -m pip install lcov_cobertura
-
name
:
Compile instrumented
run
:
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make -j$(nproc) CXXOPTS="-Werror -g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes CPPCHK_GLIBCXX_DEBUG= all
-
name
:
Run instrumented tests
run
:
|
./testrunner
test/cfg/runtests.sh
-
name
:
Generate coverage report
run
:
|
gcov lib/*.cpp -o lib/
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
genhtml lcov.info -o coverage_report --frame --legend --demangle-cpp
-
uses
:
actions/upload-artifact@v7
with
:
name
:
Coverage results
path
:
coverage_report
-
uses
:
codecov/codecov-action@v5
with
:
token
:
${{ secrets.CODECOV_TOKEN }}
#
file: ./coverage.xml # optional
flags
:
unittests
#
optional
name
:
${{ github.repository }}
#
optional
fail_ci_if_error
:
true
#
optional (default = false):
Back
|
FazBrowse Home
|
New Git URL