Skip to content

Commit

Permalink
Fix clab#784: enable pip installation test on Travis CI for OSX
Browse files Browse the repository at this point in the history
This works when using DYLD_LIBRARY_PATH, which is now done anyway.
  • Loading branch information
danielhers committed Aug 16, 2017
1 parent 797fdfc commit fc66a01
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ matrix:
compiler: clang
- os: osx
compiler: gcc
- os: osx
env: PYVER=3.4 PYNUM=3 PYTHON_INSTALL=pip
- os: osx
env: PYVER=2.7 PYNUM=2 PYTHON_INSTALL=pip

before_install:
# We do this conditionally because it saves us some downloading if the
Expand Down Expand Up @@ -83,12 +79,18 @@ after_failure:

script:
- 'if [[ "$PYTHON_INSTALL" == "manual" ]]; then
if [[ $TRAVIS_OS_NAME == "linux" ]]; then make -j$(nproc); fi;
if [[ $TRAVIS_OS_NAME == "osx" ]]; then make -j$(sysctl -n hw.ncpu); fi;
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
make -j$(nproc);
fi;
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make -j$(sysctl -n hw.ncpu);
export DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/build/dynet:$DYLD_LIBRARY_PATH;
fi;
make test || travis_terminate 1;
cd python;
python ../../setup.py build --build-dir=.. install --user || travis_terminate 1;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export DYLD_LIBRARY_PATH=$(dirname $(which python))/../lib:$DYLD_LIBRARY_PATH;
fi'
- cd $TRAVIS_BUILD_DIR/tests/python
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then export DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/build/dynet:$DYLD_LIBRARY_PATH; fi;
- python test.py

0 comments on commit fc66a01

Please sign in to comment.