-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.46 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
name: build
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up environment
# use the local action specified in action.yml
uses: ./.github/workflows
- name: Create debug build
run: make clean && make debug
- name: Create release build
run: make clean && make release
test:
runs-on: ubuntu-22.04
name: test
needs: build
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up environment
# use the local action specified in action.yml
uses: ./.github/workflows
- name: Run unit tests
run: make tests
- name: Check memory management bugs with Valgrind
run: make valgrind
- name: Run CLI tests on release build
run: chmod +x ./cli_test.sh && ./cli_test.sh -r
lint:
if: github.ref == 'refs/heads/main' || github.base_ref == 'main'
name: lint
runs-on: ubuntu-22.04
needs: build
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install cmocka
# clang-tidy requires code to be compilable
run: |
SCRIPT='./.github/scripts/install_cmocka.sh'
chmod +x "$SCRIPT" && "$SCRIPT"
- name: Check coding styles
run: make fmt FMTFLAGS='--dry-run --Werror'
- name: Check naming conventions & bug-proneness
run: make tidy