Skip to content

Code Coverage

Code Coverage #2045

Workflow file for this run

name: Code Coverage
on:
workflow_dispatch:
schedule:
- cron: '15 09 * * *' # Run in the early hours of the morning (UTC)
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container: helics/buildenv:ubuntu22.04-default-builder
defaults:
run:
shell: bash
env:
BUILD_TYPE: Coverage
GCOV_TOOL: gcov
CMAKE_GENERATOR: Unix Makefiles
MAKEFLAGS: '-j 4'
DISABLE_INTERFACES: 'Java'
DISABLE_EXAMPLES: 'true'
DISABLE_CXX_SHARED: 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: true
if: github.event_name != 'schedule'
- name: Checkout develop branch
uses: actions/checkout@v4
with:
submodules: true
ref: develop
if: github.event_name == 'schedule'
- name: Build HELICS
run: |
unset VCPKG_ROOT
git config --global --add safe.directory ${GITHUB_WORKSPACE}
source scripts/setup-helics-ci-options.sh
mkdir -p build && cd build
../scripts/ci-build.sh
- name: Setup coverage counters
run: scripts/lcov-helper.sh setup-counters
- name: Run tests
working-directory: build
run: ../scripts/run-coverage-tests.sh
- name: Gather and upload coverage results
run: scripts/lcov-helper.sh gather-coverage-info --gcov ${GCOV_TOOL} --codecov