Skip to content

Commit 6b035de

Browse files
author
Chaitanya Tata
committed
CI: Add scan-build
Run scan-build (clang-tools based) static analyzer on all build variants. Use specific versions of the OSes as the default ones in Travis are old and unsuitable to install packages.
1 parent 66e2668 commit 6b035de

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

.travis.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
11
language: cpp
2+
3+
addons:
4+
apt:
5+
packages:
6+
# Need for scan-build
7+
- clang-tools
8+
homebrew:
9+
taps: mgrebenets/scan-build
10+
packages:
11+
- scan-build
212
matrix:
313
include:
414
- os: linux
15+
dist: bionic
516
compiler: gcc
617
- os: linux
18+
dist: bionic
19+
compiler: clang
20+
- os: linux
21+
dist: focal
22+
compiler: gcc
23+
- os: linux
24+
dist: focal
725
compiler: clang
826
- os: osx
27+
osx_image: xcode12.2
28+
29+
# See https://stackoverflow.com/a/58349403/2335781
30+
before_script:
31+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/; fi
32+
933
script:
10-
- make -C tests EXTRA_CFLAGS="-W -Wall -Wextra"
11-
- make -C tests clean ; make -C tests pedantic
12-
- make -C tests clean ; make -C tests pedantic EXTRA_CFLAGS=-DNO_DECLTYPE
13-
- make -C tests clean ; make -C tests cplusplus
14-
- make -C tests clean ; make -C tests cplusplus EXTRA_CFLAGS=-DNO_DECLTYPE
34+
- scan-build make -C tests EXTRA_CFLAGS="-W -Wall -Wextra"
35+
- make -C tests clean ; scan-build make -C tests pedantic
36+
- make -C tests clean ; scan-build make -C tests pedantic EXTRA_CFLAGS=-DNO_DECLTYPE
37+
- make -C tests clean ; scan-build make -C tests cplusplus
38+
- make -C tests clean ; scan-build make -C tests cplusplus EXTRA_CFLAGS=-DNO_DECLTYPE

0 commit comments

Comments
 (0)