Fix build issues for new images #341
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code coverage | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: "Unit tests coverage" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
lfs: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install \ | |
lcov \ | |
ninja-build \ | |
python3-cairosvg \ | |
python3-defusedxml \ | |
python3-pil \ | |
qt6-base-dev \ | |
qt6-declarative-dev \ | |
qt6-declarative-dev-tools \ | |
qt6-declarative-private-dev \ | |
qt6-multimedia-dev \ | |
qt6-quick3d-dev \ | |
qt6-quick3d-dev-tools \ | |
qt6-l10n-tools \ | |
qml6-module-qtqml-workerscript \ | |
qml6-module-qtquick-window \ | |
libqt6shadertools6-dev \ | |
libqt6svg6-dev \ | |
libqt6quick3druntimerender6 \ | |
libboost-dev \ | |
libopencv-dev \ | |
libopenblas-dev \ | |
libdlib-dev \ | |
libgmock-dev \ | |
libgl1-mesa-dev \ | |
libglvnd-dev \ | |
libwebp-dev | |
- name: Install CsLibGuarded | |
run: | | |
git clone -b libguarded-1.4.1 https://github.com/copperspice/cs_libguarded.git | |
cd cs_libguarded | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --target all | |
sudo cmake --build . --target install | |
- name: Install Exiv2 | |
run: | | |
sudo apt-get install libinih-dev | |
git clone -b v0.28.2 https://github.com/Exiv2/exiv2.git | |
cd exiv2 | |
mkdir build | |
cd build | |
cmake .. -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_BUILD_EXIV2_COMMAND=OFF -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_BUILD_SAMPLES=OFF | |
cmake --build . --target all | |
sudo cmake --build . --target install | |
- name: Setup ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
with: | |
key: ${{ github.job }}-${{ matrix.compiler.compiler }} | |
- name: Build | |
uses: ashutoshvarma/action-cmake-build@master | |
with: | |
build-dir: ${{ runner.workspace }}/build | |
build-type: Debug | |
configure-options: | |
-DBUILD_SHARED_LIBS=${{ matrix.shared }} | |
-DLUPDATE=/usr/lib/qt6/bin/lupdate | |
-DLRELEASE:FILEPATH=/usr/lib/qt6/bin/lrelease | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
-DENABLE_SANITIZERS_FOR_TESTS=FALSE | |
-DBUILD_LEARNING_TESTS=TRUE | |
-DCMAKE_CXX_FLAGS=--coverage | |
-DCMAKE_SHARED_LINKER_FLAGS=--coverage | |
-DCMAKE_EXE_LINKER_FLAGS=--coverage | |
run-test: true | |
ctest-options: | |
--output-on-failure | |
- name: Generate lcov raports | |
run: | | |
lcov --capture --ignore-errors mismatch --directory ${{ runner.workspace }}/build --output-file coverage.info | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info | |
lcov --list coverage.info | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |