-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Chaitanya Tata
committed
Jan 3, 2021
1 parent
66e2668
commit 5247885
Showing
1 changed file
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
language: cpp | ||
|
||
addons: | ||
apt: | ||
packages: | ||
# Need for scan-build | ||
- clang-tools | ||
homebrew: | ||
taps: mgrebenets/scan-build | ||
packages: | ||
- scan-build | ||
matrix: | ||
include: | ||
- os: linux | ||
dist: bionic | ||
compiler: gcc | ||
- os: linux | ||
dist: bionic | ||
compiler: clang | ||
- os: linux | ||
dist: focal | ||
compiler: gcc | ||
- os: linux | ||
dist: focal | ||
compiler: clang | ||
- os: osx | ||
osx_image: xcode12.2 | ||
|
||
# See https://stackoverflow.com/a/26185979/2335781 and | ||
# https://discourse.brew.sh/t/solved-scan-build-from-llvm-7-0-seems-broken-on-macos-mojave/3151/11 | ||
before_script: | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sudo xcode-select --switch /Library/Developer/CommandLineTools/ ; fi | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg ; fi | ||
|
||
script: | ||
- make -C tests EXTRA_CFLAGS="-W -Wall -Wextra" | ||
- make -C tests clean ; make -C tests pedantic | ||
- make -C tests clean ; make -C tests pedantic EXTRA_CFLAGS=-DNO_DECLTYPE | ||
- make -C tests clean ; make -C tests cplusplus | ||
- make -C tests clean ; make -C tests cplusplus EXTRA_CFLAGS=-DNO_DECLTYPE | ||
- scan-build make -C tests EXTRA_CFLAGS="-W -Wall -Wextra" | ||
- make -C tests clean ; scan-build make -C tests pedantic | ||
- make -C tests clean ; scan-build make -C tests pedantic EXTRA_CFLAGS=-DNO_DECLTYPE | ||
- make -C tests clean ; scan-build make -C tests cplusplus | ||
- make -C tests clean ; scan-build make -C tests cplusplus EXTRA_CFLAGS=-DNO_DECLTYPE |