Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add scan-build #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
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/58349403/2335781
before_script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/; 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