blob: 2b25f4766fdc1cec089d101c6581d516c9734b48 [file] [log] [blame]
Christopher Dunn88184d12015-04-22 19:43:27 -07001#!/usr/bin/env sh
2# This is called by `.travis.yml` via Travis CI.
3# Travis supplies $TRAVIS_OS_NAME.
4# http://docs.travis-ci.com/user/multi-os/
5# Our .travis.yml also defines:
6# - SHARED_LIB=ON/OFF
7# - STATIC_LIB=ON/OFF
8# - CMAKE_PKG=ON/OFF
9# - BUILD_TYPE=release/debug
10# - VERBOSE_MAKE=false/true
11# - VERBOSE (set or not)
12
13# -e: fail on error
14# -v: show commands
15# -x: show expanded commands
16set -vex
17
18env | sort
19
20cmake -DJSONCPP_WITH_CMAKE_PACKAGE=$CMAKE_PKG -DBUILD_SHARED_LIBS=$SHARED_LIB -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE .
21make
22
23# Python is not available in Travis for osx.
24# https://github.com/travis-ci/travis-ci/issues/2320
25if [ "$TRAVIS_OS_NAME" != "osx" ]
26then
27 make jsoncpp_check
28 valgrind --error-exitcode=42 --leak-check=full ./src/test_lib_json/jsoncpp_test
29fi