chore: Install code coverage tooling on CI

See [internal] Continuous Integration on GitHub Actions #233
This commit is contained in:
Francois Best 2021-08-10 09:02:30 +02:00
parent 2f03d9b29d
commit ace533beaa
2 changed files with 16 additions and 2 deletions

View File

@ -9,6 +9,8 @@ on:
env: env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release BUILD_TYPE: Release
LCOV_ROOT: ${{github.workspace}}/lcov
PATH: "$LCOV_ROOT;$PATH"
jobs: jobs:
build: build:
@ -19,10 +21,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo $PATH
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: recursive submodules: recursive
- name: Install coverage tools
run: ${{github.workspace}}/builder/install-lcov.sh
- name: Configure CMake - name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
@ -35,4 +41,4 @@ jobs:
- name: Run Unit Tests - name: Run Unit Tests
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ./test/unit-tests/unit-tests run: ./test/unit-tests/unit-tests

8
builder/install-lcov.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
export LCOV_ROOT="$HOME/lcov"
mkdir -p "$LCOV_ROOT"
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.14.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz"
tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
export PATH="$LCOV_ROOT/bin:$PATH"
which lcov