mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-03 18:10:12 +02:00
Update Travis configuration
This commit is contained in:
parent
ed258de63d
commit
d14d8c35c3
24
.travis.yml
24
.travis.yml
@ -7,14 +7,24 @@
|
||||
# to allow C++11, though we are not yet building with -std=c++11
|
||||
|
||||
install:
|
||||
- if [[ $TRAVIS_OS_NAME == osx ]]; then
|
||||
brew update;
|
||||
brew install python3 ninja;
|
||||
python3 -m venv venv;
|
||||
source venv/bin/activate;
|
||||
elif [[ $TRAVIS_OS_NAME == linux ]]; then
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip;
|
||||
unzip -q ninja-linux.zip -d build;
|
||||
fi
|
||||
- pip3 install meson
|
||||
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||
- if [[ $CXX = g++ ]]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||
# /usr/bin/clang has a conflict with gcc, so use clang-X.Y.
|
||||
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.5" CC="clang-3.5"; fi
|
||||
- if [[ $CXX = clang++ ]]; then export CXX="clang++-3.5" CC="clang-3.5"; fi
|
||||
- echo ${PATH}
|
||||
- ls /usr/local
|
||||
- ls /usr/local/bin
|
||||
- export PATH=/usr/local/bin:/usr/bin:${PATH}
|
||||
- export PATH="${PWD}"/build:/usr/local/bin:/usr/bin:${PATH}
|
||||
- echo ${CXX}
|
||||
- ${CXX} --version
|
||||
- which valgrind
|
||||
@ -23,10 +33,7 @@ addons:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.5
|
||||
- george-edison55-precise-backports # cmake 3.2.3
|
||||
packages:
|
||||
- cmake
|
||||
- cmake-data
|
||||
- gcc-4.9
|
||||
- g++-4.9
|
||||
- clang-3.5
|
||||
@ -40,8 +47,9 @@ compiler:
|
||||
script: ./travis.sh
|
||||
env:
|
||||
matrix:
|
||||
- SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false
|
||||
- SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE
|
||||
- LIB_TYPE=static BUILD_TYPE=release
|
||||
- LIB_TYPE=shared BUILD_TYPE=debug
|
||||
notifications:
|
||||
email: false
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
16
travis.sh
16
travis.sh
@ -17,15 +17,7 @@ set -vex
|
||||
|
||||
env | sort
|
||||
|
||||
cmake -DJSONCPP_WITH_CMAKE_PACKAGE=$CMAKE_PKG -DBUILD_SHARED_LIBS=$SHARED_LIB -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE .
|
||||
make
|
||||
cmake -DJSONCPP_WITH_CMAKE_PACKAGE=$CMAKE_PKG -DBUILD_SHARED_LIBS=$SHARED_LIB -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE -DJSONCPP_USE_SECURE_MEMORY=1 .
|
||||
make
|
||||
|
||||
# Python is not available in Travis for osx.
|
||||
# https://github.com/travis-ci/travis-ci/issues/2320
|
||||
if [ "$TRAVIS_OS_NAME" != "osx" ]
|
||||
then
|
||||
make jsoncpp_check
|
||||
valgrind --error-exitcode=42 --leak-check=full ./src/test_lib_json/jsoncpp_test
|
||||
fi
|
||||
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
||||
ninja -v -C build-${LIB_TYPE}
|
||||
ninja -v -C build-${LIB_TYPE} test
|
||||
rm -r build-${LIB_TYPE}
|
||||
|
Loading…
x
Reference in New Issue
Block a user