-
Notifications
You must be signed in to change notification settings - Fork 40
55 lines (47 loc) · 1.36 KB
/
code-coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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