-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (106 loc) · 3.34 KB
/
low_level_tests.yml
File metadata and controls
109 lines (106 loc) · 3.34 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: LowLevelTests
on: [ push ]
jobs:
Run-Tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [ { cc: gcc-10, cxx: g++-10 },
{ cc: gcc-11, cxx: g++-11 },
{ cc: clang-11, cxx: clang++-11 },
{ cc: clang-12, cxx: clang++-12 },
{ cc: clang-13, cxx: clang++-13 },
{ cc: clang-14, cxx: clang++-14 },
{ cc: clang-15, cxx: clang++-15 },
# { cc: clang-16, cxx: clang++-16 },
{ cc: clang-17, cxx: clang++-17 } ]
build: [ Release, Debug ]
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: |
# Taken from https://apt.llvm.org/
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo apt-get update
sudo apt-get install -y wget g++-9 g++-10 g++-11 protobuf-compiler valgrind python3-protobuf clang-* scons
- name: Run NanoPB Tests
run: |
cd Src/Messages/External/nanopb/tests/
scons
- name: Set up Build
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build }}
- name: Build and run tests
run: cmake --build build --target RunAllTests
- uses: actions/upload-artifact@v3
with:
name: RunResults
path: build/Tests/LowLevel
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.compiler.cc }}
path: .
Report:
runs-on: ubuntu-latest
needs: Run-Tests
if: ${{ always() }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/download-artifact@v3
with:
name: RunResults
- name: tree
run: tree
- name: Install junit2html
run: pip3 install junit2html
- name: Merge Results
run: junit2html . --merge report.xml
- name: Gen HTML
run: junit2html report.xml --report-matrix index.html
- name: Move HTML
run: |
mkdir -p out/report
mv *.html out/report
- uses: actions/upload-artifact@v3
with:
name: llt-report
path: out
Coverage:
runs-on: ubuntu-latest
needs: Run-Tests
if: ${{ always() }}
steps:
- uses: actions/download-artifact@v3
with:
name: gcc-11
- run: tree
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y lcov
- name: Set up Build
run: cmake -B build
- name: Run LCOV
run: |
lcov --no-external --capture --directory build -o local.info
lcov -a local.info -o coverage.info
- name: Gen HTML
run: genhtml coverage.info --output-directory coverage
- name: Move HTML
run: |
mkdir -p out/
mv coverage out/coverage
- uses: actions/upload-artifact@v3
with:
name: llt-coverage
path: out