forked from eclipse-iceoryx/iceoryx
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.76 KB
/
coverage_doc.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This workflow run the coverage scan and generate the doxygen documentation in iceoryx
name: Test Coverage + Doxygen Documentation
# Triggers the workflow on push or pull request events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master, release* ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
iceoryx-coverage-doxygen-ubuntu:
runs-on: ubuntu-20.04
steps:
- name: compiler versions
run: |
echo $(gcc --version)
echo $(clang --version)
- name: Install iceoryx dependencies
# Softwares installed in ubuntu-18.04 instance
# https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
run: |
sudo apt-get update
sudo apt-get install -y libacl1-dev libncurses5-dev git cmake build-essential doxygen graphviz texlive-font-utils lcov
sudo apt-get install -y plantuml texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-fonts-recommended
- name : Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build, test and generate gcov report
run: |
mkdir $GITHUB_WORKSPACE/lcov_results
mkdir $GITHUB_WORKSPACE/lcov_results/unittest
mkdir $GITHUB_WORKSPACE/lcov_results/unittest_timing
# add flag to include coverage
sudo $GITHUB_WORKSPACE/tools/add_test_users.sh
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict build-all test-add-user -c unit
cp -rf $GITHUB_WORKSPACE/build/lcov/ $GITHUB_WORKSPACE/lcov_results/unittest/
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict build-all test-add-user -c unit-timing clean
cp -rf $GITHUB_WORKSPACE/build/lcov/ $GITHUB_WORKSPACE/lcov_results/unittest_timing/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./lcov_results/unittest/lcov/iceoryx_lcov_result_unit.info
name: iceoryx
flags: unittests
fail_ci_if_error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./lcov_results/unittest_timing/lcov/iceoryx_lcov_result_unit-timing.info
name: iceoryx
flags: unittests_timing
fail_ci_if_error: true
- name: Generate doxygen documentation
run: |
# add flag to include coverage
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh clean doc
- name: Archive generated doxygen
uses: actions/upload-artifact@v2
with:
name: iceoryx-pdf
path: |
./build/doc/*.pdf
retention-days: 30