build_and_test.sh 549 字节
Newer Older
Y
Yu Yang 已提交
1
#!/bin/bash
Y
Yu Yang 已提交
2
source ./common.sh
L
liaogang 已提交
3

Y
Yu Yang 已提交
4 5
NPROC=1
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
6 7 8
  export PYTHONPATH=/opt/python/2.7.12/lib/python2.7/site-packages
  export PYTHONHOME=/opt/python/2.7.12
  export PATH=/opt/python/2.7.12/bin:${PATH}
9
  cmake .. -DON_TRAVIS=ON -DWITH_COVERAGE=ON -DCOVERALLS_UPLOAD=ON
Y
Yu Yang 已提交
10
  NRPOC=`nproc`
G
gangliao 已提交
11 12
  make -j $NPROC
  make coveralls
L
liaogang 已提交
13
  sudo make install
Y
Yu Yang 已提交
14
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
15
  export PYTHONPATH=/usr/local/lib/python2.7/site-packages
16
  cmake .. -DON_TRAVIS=ON
Y
Yu Yang 已提交
17
  NPROC=`sysctl -n hw.ncpu`
G
gangliao 已提交
18
  make -j $NPROC
Y
Yu Yang 已提交
19
fi