Skip to content

Commit

Permalink
Merge pull request apache#2 from sergeykolychev/dyld_lib
Browse files Browse the repository at this point in the history
Cleanup of OSX perl-package handling.
  • Loading branch information
sergeykolychev authored Feb 16, 2017
2 parents 8e019cf + 13ed23e commit 8903061
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
20 changes: 3 additions & 17 deletions tests/travis/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,32 +153,18 @@ if [ ${TASK} == "perl_test" ]; then
ln -s ${CACHE_PREFIX}/data ${MXNET_HOME}/perl-package/AI-MXNet/data

if [ ${TRAVIS_OS_NAME} == "osx" ]; then
sudo sh -c 'curl -L https://cpanmin.us | perl - App::cpanminus'
sudo cpanm -q -n -f --installdeps PDL Mouse Function::Parameters || true
sudo cpanm -q -n -f PDL Mouse Function::Parameters || true
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/
Expand Down
3 changes: 3 additions & 0 deletions tests/travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ fi
if [ ${TASK} == "perl_test" ]; then
if [ ${TRAVIS_OS_NAME} == "linux" ]; then
cpanm -q -L "${HOME}/perl5" Function::Parameters
else
sudo sh -c 'curl -L https://cpanmin.us | perl - App::cpanminus'
sudo cpanm -q -n PDL Mouse Function::Parameters
fi
fi

0 comments on commit 8903061

Please sign in to comment.