Skip to content

Commit 032c43b

Browse files
committed
in travis, build for osx also
Does not actually do anything yet.
1 parent 1f41f76 commit 032c43b

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
# http://about.travis-ci.org/docs/user/build-configuration/
33
# This file can be validated on:
44
# http://lint.travis-ci.org/
5-
before_install: sudo apt-get install cmake
5+
6+
#before_install: sudo apt-get install -y cmake
7+
# cmake is pre-installed in Travis for both linux and osx
8+
9+
os:
10+
- linux
11+
- osx
612
language: cpp
713
compiler:
814
- gcc
915
- clang
10-
script: cmake -DJSONCPP_WITH_CMAKE_PACKAGE=$CMAKE_PKG -DBUILD_SHARED_LIBS=$SHARED_LIB -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE . && make && make jsoncpp_check
16+
script: ./travis.sh
1117
env:
1218
matrix:
1319
- SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false

travis.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/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
16+
set -vex
17+
18+
env | sort
19+
20+
cmake -DJSONCPP_WITH_CMAKE_PACKAGE=$CMAKE_PKG -DBUILD_SHARED_LIBS=$SHARED_LIB -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE .
21+
make
22+
23+
# Python is not available in Travis for osx.
24+
# https://github.com/travis-ci/travis-ci/issues/2320
25+
if [ "$TRAVIS_OS_NAME" != "osx" ]
26+
then
27+
make jsoncpp_check
28+
fi

0 commit comments

Comments
 (0)