forked from jballoffet/c-template
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 1.76 KB
/
c-cpp.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
name: C/C++ CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install doxygen graphviz valgrind
- name: Build application
run: make
- name: Build and check documentation
run: |
make doc
bash scripts/check_doc.sh
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install doxygen graphviz valgrind clang-format
- name: Build and run unit tests
run: make test
- name: Coding style analysis
run: |
make format
bash scripts/check_format.sh
- name: Static analysis
run: |
make tidy > tidy_log.txt
bash scripts/check_tidy.sh
- name: Dynamic analysis
run: make memcheck
- name: Run Google's Address and Leak Sanitizer (ASAN and LSAN)
run: make test COMPILER=clang DEBUG=on GOOGLE_SANITIZER=asan
- name: Run Google's Memory Sanitizer (MSAN)
run: make test COMPILER=clang DEBUG=on GOOGLE_SANITIZER=msan
- name: Run Google's Undefined Behavior Sanitizer (UBSAN)
run: make test COMPILER=clang DEBUG=on GOOGLE_SANITIZER=ubsan
report:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Compute code coverage
run: make test DEBUG=on COVERAGE=on
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
gcov: true