Skip to content

Fixing Linux builds. #195

Fixing Linux builds.

Fixing Linux builds. #195

Workflow file for this run

name: Code coverage
on:
push:
branches:
- master
jobs:
codecov:
name: Code coverage
runs-on: ubuntu-22.04
env:
BUILD_TYPE: RelWithDebInfo
# CODECOV_TOKEN: 9c75edd2-e08d-48ce-a919-5ee804875918 Not needed for public repository
PROJ_LIB: ${{github.workspace}}/bin/share/proj
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Cache Conan libs
id: cache-conan
uses: pat-s/[email protected]
with:
path: /home/runner/.conan
key: conan-osx
- name: Install Conan
run: |
python -m pip install --upgrade pip
pip install wheel conan==1.*
# gitlab support (wxwidgets, mysql, gdal)
conan remote add gitlab https://gitlab.com/api/v4/packages/conan --force
# create default profile with libstdc++11
conan profile new default --detect --force
conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update conf.tools.system.package_manager:mode=install default
conan profile update conf.tools.system.package_manager:sudo=True default
- name: Install system libs
run: |
sudo apt-get update
# lcov
sudo apt-get install lcov
# GTK 3.0 libraries
sudo apt-get install libgtk-3-0 libgtk-3-dev
sudo apt-get install libx11-xcb-dev libfontenc-dev libxaw7-dev libxmu-dev libxmuu-dev libxpm-dev libxres-dev libxss-dev
sudo apt-get install libxv-dev libxvmc-dev libxxf86vm-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev
sudo apt-get install libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev
sudo apt-get install libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-dri3-dev libxcb-util-dev
# needed for MySQL
sudo apt-get install libncurses5-dev libssl-dev libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev
sudo apt-get install libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev
sudo apt-get install libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev
sudo apt-get install libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev
sudo apt-get install libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev
sudo apt-get install libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev
- name: Install libraries
run: |
mkdir ${{github.workspace}}/bin
cd ${{github.workspace}}/bin
conan install .. -o code_coverage=True --build=missing
- name: Configure CMake
working-directory: ${{github.workspace}}/bin
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_CODECOV=1 -DUSE_UNITTEST=1
- name: Build and run code coverage
working-directory: ${{github.workspace}}/bin
run: cmake --build . --config ${{env.BUILD_TYPE}} --target code-coverage
- name: Preparing coverage data
working-directory: ${{github.workspace}}/bin
run: lcov --directory . --capture --output-file coverage.info
- name: Display code coverage report
working-directory: ${{github.workspace}}/bin
run: lcov --list coverage.info
- uses: codecov/codecov-action@v3
with:
files: ${{github.workspace}}/bin/coverage.info
fail_ci_if_error: true
verbose: true