@@ -20,25 +20,61 @@ jobs:
2020 libreadline6-dev \
2121 autoconf \
2222 automake \
23- python3-pytest
23+ python3-pytest \
24+ valgrind
2425
2526 - name : Prepare (autoreconf)
2627 run : autoreconf -i
2728
28- - name : Prepare (configure)
29+ # Build 1: ASAN
30+ - name : Create ASAN build directory
31+ run : mkdir -p build-asan
32+
33+ - name : Configure ASAN build
34+ working-directory : build-asan
2935 env :
3036 CFLAGS : " -g -O2 -Wpedantic -Werror -Wno-error=unused-result -fsanitize=address,undefined -fno-omit-frame-pointer"
3137 LDFLAGS : " -fsanitize=address,undefined"
32- run : ./configure
38+ run : .. /configure
3339
34- - name : Build
40+ - name : Build ASAN
41+ working-directory : build-asan
3542 run : make
3643
37- - name : Run pytest
44+ - name : Run pytest with ASAN
45+ continue-on-error : true
46+ env :
47+ ASAN_OPTIONS : " detect_leaks=1"
48+ UBSAN_OPTIONS : " print_stacktrace=1"
49+ run : pytest -v --cmd="build-asan/microcom"
50+
51+ - name : Run check with ASAN
52+ continue-on-error : true
53+ working-directory : build-asan
3854 env :
3955 ASAN_OPTIONS : " detect_leaks=1"
4056 UBSAN_OPTIONS : " print_stacktrace=1"
41- run : pytest -v
57+ run : make check
58+
59+ # Build 2: Valgrind
60+ - name : Create unoptimized build directory
61+ run : mkdir -p build-unopt
62+
63+ - name : Configure unoptimized build
64+ working-directory : build-unopt
65+ env :
66+ CFLAGS : " -g -O0 -Wpedantic -Werror -Wno-error=unused-result"
67+ run : ../configure
68+
69+ - name : Build unoptimized
70+ working-directory : build-unopt
71+ run : make
72+
73+ - name : Run pytest with Valgrind
74+ continue-on-error : true
75+ run : pytest -v --cmd="valgrind --tool=memcheck --error-exitcode=99 --quiet build-unopt/microcom"
4276
43- - name : Run check
77+ - name : Run check with Valgrind
78+ continue-on-error : true
79+ working-directory : build-unopt
4480 run : make check
0 commit comments