coverage.yml: avoid unnecessary test execution and package installation / come cleanups (#4434)
* coverage.yml: avoid duplicated test execution * coverage.yml: split test execution and report generation into separate steps * coverage.yml: split software and Python package installation into separate steps * coverage.yml: removed unnecessary `libcppunit-dev` installation - library headers are only needed when performing syntax checking
This commit is contained in:
parent
4d767d821e
commit
0f5d2a31b3
|
@ -23,22 +23,25 @@ jobs:
|
|||
- name: Install missing software on ubuntu
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxml2-utils
|
||||
sudo apt-get install lcov
|
||||
sudo apt-get install libcppunit-dev
|
||||
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) test CXXFLAGS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes
|
||||
make -j$(nproc) all CXXFLAGS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes
|
||||
|
||||
- name: Run instrumented tests
|
||||
run: |
|
||||
./testrunner
|
||||
test/cfg/runtests.sh
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
rm -rf coverage_report
|
||||
./testrunner
|
||||
test/cfg/runtests.sh
|
||||
gcov lib/*.cpp -o lib/
|
||||
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
|
||||
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
|
||||
|
|
Loading…
Reference in New Issue