build_and_test.sh 606 字节
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 9
  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}
  cmake .. -DON_TRAVIS=ON -DON_COVERALLS=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 16
  export PYTHONPATH=/usr/local/lib/python2.7/site-packages
  cmake .. -DON_TRAVIS=ON -DON_COVERALLS=ON -DCOVERALLS_UPLOAD=ON -DWITH_SWIG_PY=ON
Y
Yu Yang 已提交
17
  NPROC=`sysctl -n hw.ncpu`
G
gangliao 已提交
18
  make -j $NPROC
Y
Yu Yang 已提交
19
fi