-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (54 loc) · 2.08 KB
/
code_coverage.yml
File metadata and controls
56 lines (54 loc) · 2.08 KB
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
56
# This workflow is triggered by the pr.yml workflow.
# We are using this workflow to build the code coverage for the PR branches.
# To get the code coverage, we use codecov which operates on lcov files generated by building with the flag CODE_COVERAGE=ON and running the tests.
# The test have a timeout of 90 minutes, as building the code coverage can take a long time.
name: Code Coverage
on:
# We are using this yaml in other workflows, e.g., nightly or PR, so we need to allow another workflow call to trigger this workflow.
# We are expecting the tag of the docker image to be passed as an output from the previous job.
workflow_call:
inputs:
dev_image_tag:
required: true
type: string
description: "Docker image tag of the development image of the head commit"
head_sha:
required: true
type: string
description: "Commit sha of head"
branch-name:
required: false
type: string
description: name of the branch the coverage will be associated with, if not provided codecov will pick
jobs:
build-code-coverage-pr-branch:
container:
image: nebulastream/nes-ci:${{ inputs.dev_image_tag }}
volumes:
- ccache:/ccache
env:
CCACHE_DIR: /ccache
# TODO #401 Investigate rootless docker containers
options: --user root
timeout-minutes: 90
runs-on: [ self-hosted, linux, Build, "${{matrix.platform}}" ]
strategy:
fail-fast: false
matrix:
platform: [ x64 ]
steps:
- name: Checkout PR Branch
uses: actions/checkout@v4
- name: Build coverage and export as lcov
run: |
cmake -DCODE_COVERAGE=ON -B build
cmake --build build -j -- -k 0
cmake --build build --target ccov-all-export
- uses: codecov/codecov-action@v5
with:
slug: nebulastream/nebulastream
fail_ci_if_error: true
files: build/ccov/coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}
override_branch: ${{ inputs.branch-name }}
override_commit: ${{ inputs.head_sha }}