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
|
- name: Install missing software on ubuntu
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libxml2-utils
|
sudo apt-get install libxml2-utils lcov
|
||||||
sudo apt-get install lcov
|
|
||||||
sudo apt-get install libcppunit-dev
|
- name: Install missing Python packages on ubuntu
|
||||||
|
run: |
|
||||||
python -m pip install pip --upgrade
|
python -m pip install pip --upgrade
|
||||||
python -m pip install lcov_cobertura
|
python -m pip install lcov_cobertura
|
||||||
|
|
||||||
- name: Compile instrumented
|
- name: Compile instrumented
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
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: Generate coverage report
|
- name: Run instrumented tests
|
||||||
run: |
|
run: |
|
||||||
rm -rf coverage_report
|
|
||||||
./testrunner
|
./testrunner
|
||||||
test/cfg/runtests.sh
|
test/cfg/runtests.sh
|
||||||
|
|
||||||
|
- name: Generate coverage report
|
||||||
|
run: |
|
||||||
gcov lib/*.cpp -o lib/
|
gcov lib/*.cpp -o lib/
|
||||||
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
|
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
|
||||||
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
|
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
|
||||||
|
|
Loading…
Reference in New Issue