-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (55 loc) · 2.07 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ secrets.DOCS_TOKEN }}
- name: Install Dependencies
run: |
sudo apt install build-essential
sudo apt install git
sudo apt install cmake
sudo apt install clang-format
sudo apt install valgrind
sudo apt install cppcheck
sudo apt install lcov
- name: Build
run: |
mkdir build
cd build
cmake ..
cmake --build .
- name: Test
working-directory: build
run: ./RaidZeroLib
- name: Valgrind
working-directory: build
run: valgrind --tool=memcheck --leak-check=full --leak-resolution=med --show-leak-kinds=all --undef-value-errors=yes --track-origins=yes --error-exitcode=1 --show-reachable=no ./RaidZeroLib
- name: Cppcheck
working-directory: .
run: cppcheck --enable=all --suppress=missingInclude --suppress=unusedFunction --error-exitcode=1 -I include/RaidZeroLib src/RaidZeroLib test
- name: Formatting Check
uses: DoozyX/clang-format-lint-action@v0.16.2
with:
clangFormatVersion: 14
style: file
source: 'include/RaidZeroLib src/RaidZeroLib test'
- name: Collect Coverage
working-directory: build
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info '*/RaidZeroLib/build/*' --output-file coverage.info
lcov --remove coverage.info '*/RaidZeroLib/include/okapi/*' --output-file coverage.info
lcov --list coverage.info
- name: Upload Coverage
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage.info