This runs cppcheck static analysis as part of the travis-ci checks. The current Travis version of cppcheck doesn't appear to support all the checks we want, but for now should be sufficient. Identified issues that would cause these checks to fail have been resolved in previous commits. Thanks to @turol for doing the work to set this up.
30 lines
497 B
YAML
30 lines
497 B
YAML
language: c
|
|
|
|
compiler: gcc
|
|
|
|
# Travis uses Ubuntu 12.04 (Precise) for builds by default, which is too
|
|
# old and missing the SDL2 packages, so use Trusty instead.
|
|
sudo: required
|
|
dist: trusty
|
|
|
|
env:
|
|
- ANALYZE=false
|
|
- ANALYZE=true
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- cppcheck
|
|
- libsdl2-dev
|
|
- libsdl2-mixer-dev
|
|
- libsdl2-net-dev
|
|
- libsdl2-image-dev
|
|
- libsamplerate0-dev
|
|
|
|
script: ./.travis.sh
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- sdl2-branch
|
|
|