Skip to content

Commit

Permalink
upgrade coverage scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
piponazo committed Jan 27, 2022
1 parent 26bb12e commit 6944c61
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/on_PR_linux_special_buils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
run: |
sudo apt-get install ninja-build
pip3 install conan==1.43.0
pip3 install gcovr
- name: Conan common config
run: |
Expand All @@ -32,24 +33,36 @@ jobs:
- name: Build
run: |
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DBUILD_WITH_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=install ..
cd build && \
cmake -GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=ON \
-DEXIV2_ENABLE_PNG=ON \
-DEXIV2_ENABLE_WEBREADY=ON \
-DEXIV2_ENABLE_CURL=ON \
-DEXIV2_BUILD_UNIT_TESTS=ON \
-DEXIV2_ENABLE_BMFF=ON \
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
-DEXIV2_BUILD_SAMPLES=ON \
-DBUILD_WITH_COVERAGE=ON \
-DCMAKE_INSTALL_PREFIX=install \
.. && \
cmake --build .
- name: Tests + Upload coverage
run: |
cd build
ctest --output-on-failure
pip install gcovr
gcovr -r ./../ -x --exclude-unreachable-branches --exclude-throw-branches -o coverage.xml .
gcovr --root .. --object-dir . --exclude-directories xmpsdk --exclude-directories unitTests --exclude-directories samples --exclude '.*xmpsdk.*' --exclude '.*unitTests.*' --exclude '.*samples.*' --exclude-unreachable-branches --exclude-throw-branches --xml -o coverage.xml
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
./codecov -f build/coverage.xml
ls -lh
./codecov -f coverage.xml
special_releaseValgrind:
name: 'Ubuntu 20.04 - GCC - Release+Valgrind'
Expand Down
1 change: 1 addition & 0 deletions cmake/gcovr.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if(BUILD_WITH_COVERAGE)
COMMAND ${GCOVR} --root ${CMAKE_SOURCE_DIR} --object-dir=${CMAKE_BINARY_DIR} --html --html-details -o coverage_output/coverage.html
--exclude-directories xmpsdk --exclude-directories unitTests --exclude-directories samples
--exclude '.*xmpsdk.*' --exclude '.*unitTests.*' --exclude '.*samples.*'
--exclude-unreachable-branches --exclude-throw-branches

WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
Expand Down

0 comments on commit 6944c61

Please sign in to comment.