travis.sh 614 Bytes
Newer Older
Billy Donahue's avatar
Billy Donahue committed
1
#!/usr/bin/env sh
Billy Donahue's avatar
Billy Donahue committed
2
set -evx
3
4
5
6
7
8
9
10
11
12
13

# if possible, ask for the precise number of processors,
# otherwise take 2 processors as reasonable default; see
# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization
if [ -x /usr/bin/getconf ]; then
    MAKEFLAGS=j$(/usr/bin/getconf _NPROCESSORS_ONLN)
else
    MAKEFLAGS="j2"
fi
export MAKEFLAGS

Billy Donahue's avatar
Billy Donahue committed
14
15
env | sort

Billy Donahue's avatar
Billy Donahue committed
16
mkdir build || true
Herbert Thielen's avatar
Herbert Thielen committed
17
cd build
Billy Donahue's avatar
Billy Donahue committed
18
19
20
cmake -Dgtest_build_samples=ON \
      -Dgtest_build_tests=ON \
      -Dgmock_build_tests=ON \
deki's avatar
deki committed
21
      -DCMAKE_CXX_FLAGS=$CXX_FLAGS \
22
      -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
Herbert Thielen's avatar
Herbert Thielen committed
23
      ..
24
make
25
CTEST_OUTPUT_ON_FAILURE=1 make test