Skip to content

Commit

Permalink
Merge pull request apache#5 from sergeykolychev/osx_cleanup_2
Browse files Browse the repository at this point in the history
Workaround for SIP
  • Loading branch information
sergeykolychev authored Feb 18, 2017
2 parents 0dfde9e + 0913391 commit 63ecbb1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ matrix:
dist: trusty
env: TASK=perl_test
- os: osx
osx_image: xcode8.2
## sudo is required because
## prexexisting packages conflict
## with new ones.
## would be nice to have macports
## on travis osx, it has all needed perl packages
sudo: required
env: TASK=perl_test
# env: TASK=julia JULIA_VER=0.4
Expand Down
22 changes: 14 additions & 8 deletions tests/travis/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,30 +147,36 @@ if [ ${TASK} == "perl_test" ]; then
make all || exit -1

# use cached dir for storing data
export MXNET_HOME=${PWD}
MXNET_HOME=${PWD}
rm -rf ${MXNET_HOME}/perl-package/AI-MXNet/data
mkdir -p ${CACHE_PREFIX}/data
ln -s ${CACHE_PREFIX}/data ${MXNET_HOME}/perl-package/AI-MXNet/data

if [ ${TRAVIS_OS_NAME} == "osx" ]; then
export DYLD_LIBRARY_PATH=${MXNET_HOME}
else
export LD_LIBRARY_PATH=${MXNET_HOME}/lib
fi
export LD_LIBRARY_PATH=${MXNET_HOME}/lib
export PERL5LIB=${HOME}/perl5/lib/perl5

cd ${MXNET_HOME}/perl-package/AI-MXNetCAPI/
perl Makefile.PL INSTALL_BASE=${HOME}/perl5
make || exit -1
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
install_name_tool -change lib/libmxnet.so \
${MXNET_HOME}/lib/libmxnet.so \
blib/arch/auto/AI/MXNetCAPI/MXNetCAPI.bundle
fi
make install || exit -1

cd ${MXNET_HOME}/perl-package/AI-NNVMCAPI/
perl Makefile.PL INSTALL_BASE=${HOME}/perl5
make || exit -1
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
install_name_tool -change lib/libmxnet.so \
${MXNET_HOME}/lib/libmxnet.so \
blib/arch/auto/AI/NNVMCAPI/NNVMCAPI.bundle
fi
make install || exit -1

cd ${MXNET_HOME}/perl-package/AI-MXNet/
perl Makefile.PL
make test || exit -1
cd ${MXNET_HOME}
exit 0
fi

0 comments on commit 63ecbb1

Please sign in to comment.