cantera/.travis.yml
Bryan W. Weber ed648d308d
[CI] Fix macOS TravisCI builds
Homebrew switched their default Python recipe to Python 3, so install
python@2 recipe. Also, directly specify which version of Python should
run SCons to prevent picking up the wrong version of Python as the
sys.executable.
2018-03-13 14:32:09 -04:00

47 lines
1.5 KiB
YAML

language: cpp
sudo: false
dist: trusty
os:
- linux
- osx
addons:
apt:
packages:
- python-dev
- python-numpy
- python-pip
- python3-dev
- python3-numpy
- python3-setuptools
- gfortran
- libsundials-serial-dev
- liblapack-dev
- libblas-dev
- libboost-dev
before_script: |
echo TRAVIS_OS_NAME: $TRAVIS_OS_NAME
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update > /dev/null
brew upgrade python # Installs Python 3
brew install python@2 # Installs Python 2
brew install scons # Install SCons which *should* use Python 3
pip3 install numpy cython # Install numpy and Cython for Python 3
pip2 install numpy 3to2 # Install numpy and 3to2 for Python 2
brew install boost
else
pip2 install --user --install-option="--no-cython-compile" cython
pip2 install --user 3to2
fi
rm -f cantera.conf
script: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
scons build -j2 VERBOSE=y python2_package=full python3_package=full python3_cmd=/usr/bin/python3 blas_lapack_libs=lapack,blas optimize=n coverage=y
scons test
else
python3 `which scons` build -j2 VERBOSE=y python2_package=full python3_package=full python2_cmd=/usr/local/opt/python@2/bin/python2 blas_lapack_libs=lapack,blas optimize=n coverage=y
python3 `which scons` test
fi
after_success: |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
bash <(curl -s https://codecov.io/bash)
fi