[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.
This commit is contained in:
parent
fde5051131
commit
ed648d308d
1 changed files with 12 additions and 8 deletions
20
.travis.yml
20
.travis.yml
|
|
@ -20,23 +20,27 @@ addons:
|
|||
- libboost-dev
|
||||
before_script: |
|
||||
echo TRAVIS_OS_NAME: $TRAVIS_OS_NAME
|
||||
pip2 install --user --install-option="--no-cython-compile" cython
|
||||
pip2 install --user 3to2
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew update
|
||||
brew install scons
|
||||
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
|
||||
brew install python3
|
||||
pip3 install numpy
|
||||
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
|
||||
scons build -j2 VERBOSE=y python2_package=full python3_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y
|
||||
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
|
||||
scons test
|
||||
after_success: |
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue