Files
json-c/.travis.yml

51 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2020-04-10 13:25:41 +02:00
language: cpp
os: linux
dist: focal
jobs:
2020-04-10 13:25:41 +02:00
include:
# ubuntu focal fossa 20.04
# gcc 9 is the default on bionic
2020-04-10 13:25:41 +02:00
- os: linux
dist: focal
compiler: gcc
2020-04-10 13:25:41 +02:00
addons:
apt:
packages:
- valgrind
- cppcheck
- doxygen
2020-04-10 13:25:41 +02:00
- cmake
env: CHECK="true"
2020-04-10 13:25:41 +02:00
before_install:
- echo "Starting before_install"
2020-04-10 13:25:41 +02:00
- echo $CC
- echo $LANG
- echo $LC_ALL
- set -e
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
eval "${MATRIX_EVAL}";
if [ -n "$MATRIX_EVAL" ] && [ "$TRAVIS_COMPILER" != "clang" ]; then
sudo apt-get install -y $CC;
fi;
fi
before_script:
- echo "Starting before_script"
2020-04-10 13:25:41 +02:00
- mkdir -p build || echo "Failed to mkdir build"
- cd build || echo "Failed to cd build"
- cmake .. || echo "Failed to run cmake"
script:
- echo "Starting script"
2020-04-10 13:25:41 +02:00
- make
# when using bionic, Travis seems to ignore the "addons" section, so installing the packages with apt-get...
- if [ -n "$CHECK" ]; then
if [ "$TRAVIS_DIST" = "bionic" ]; then
sudo apt-get install -y valgrind cppcheck doxygen;
2020-04-10 13:25:41 +02:00
fi;
make distcheck;
if type cppcheck &> /dev/null ; then cppcheck --error-exitcode=1 --quiet *.h *.c tests/ ; fi;
fi