-
Notifications
You must be signed in to change notification settings - Fork 15
58 lines (55 loc) · 1.87 KB
/
Copy path_cpp_coverage.yml
File metadata and controls
58 lines (55 loc) · 1.87 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
57
58
name: cpp-coverage
on:
workflow_call:
inputs:
os:
type: string
description: The OS type for this job
required: true
env:
INSTALL_PREFIX: ${{ github.workspace }}/prefix
jobs:
coverage:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt -y update
sudo apt install cmake
sudo apt install libboost-program-options-dev libboost-filesystem-dev libboost-date-time-dev libboost-dev libboost-system-dev libboost-test-dev libboost-thread-dev libboost-regex-dev
sudo apt install libzmq3-dev libpcap-dev liblog4cxx-dev libblosc-dev libhdf5-dev librdkafka-dev
- name: Build odin-data
env:
INSTALL_PREFIX: ${{ env.INSTALL_PREFIX }}
run: |
mkdir -p $INSTALL_PREFIX
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCODE_COVERAGE_ALL=1 ../cpp
make -j8 VERBOSE=1 && make install VERBOSE=1
ls -la $INSTALL_PREFIX
- name: Run frame receiver unit tests
env:
INSTALL_PREFIX: ${{ env.INSTALL_PREFIX }}
run: |
for unittest in $(find $INSTALL_PREFIX/bin -name "unit_fr_*"); do
$unittest --log_level=test_suite
done
- name: Run frame processor unit tests
env:
INSTALL_PREFIX: ${{ env.INSTALL_PREFIX }}
run: |
for unittest in $(find $INSTALL_PREFIX/bin -name "unit_fp_*"); do
$unittest --log_level=test_suite
done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
name: ubuntu-latest
files: ./coverage.xml
fail_ci_if_error: false