-
Notifications
You must be signed in to change notification settings - Fork 42
72 lines (59 loc) · 1.84 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
68
69
70
71
72
name: test
on:
- push
- pull_request
jobs:
test:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [gcc, clang]
mode: [asan, ubsan, valgrind]
exclude:
- os: macos-latest
compiler: gcc
- mode: valgrind
os: macos-latest
- mode: valgrind
os: ubuntu-latest
compiler: clang
include:
- os: ubuntu-latest
nproc: nproc
- os: macos-latest
nproc: sysctl -n hw.logicalcpu
- compiler: gcc
cflags: -Wformat-signedness
- mode: asan
debug: -fsanitize=address
- mode: ubsan
debug: -fsanitize=undefined -fno-sanitize-recover=all
- mode: valgrind
dependenices: valgrind
exec: valgrind
valgrind: --quiet --error-exitcode=1 --leak-check=full --errors-for-leak-kinds=all --show-leak-kinds=all --suppressions=valgrind.supp
steps:
- uses: actions/checkout@v2
- name: dependenices
if: ${{matrix.dependenices}}
run: sudo apt-get update && sudo apt-get install ${{matrix.dependenices}}
- name: test
env:
CC: ${{matrix.cc || matrix.compiler}}
CFLAGS: -Werror -Wpedantic -Wshadow ${{matrix.cflags}}
CPPFLAGS: ${{matrix.cppflags}}
DEBUG: -g -O2 ${{matrix.debug}}
EXEC: ${{matrix.exec}}
VALGRIND_OPTS: ${{matrix.valgrind}}
run: |
set -ex
${CC} -v
MAKE="make -j `${{matrix.nproc}}`"
./configure || :
cat config.log
${MAKE} test
# Ensure assertions are free from side effects.
env CPPFLAGS="${CPPFLAGS} -DNDEBUG" ./configure || :
cat config.log
${MAKE} test