提交 eb688904 编写于 作者: R Raaj 提交者: Gines

Added Travis build for Mac (#1021)

上级 6a6d668c
......@@ -99,13 +99,17 @@ matrix:
# - os: windows
# env: NAME="W10-default-cmake-cuda8"
# # TO-DO: To be implemented
# # Mac OSX
# # Mac OSX - Default - CMake - CPU
# - os: osx
# osx_image: xcode10.1 # Versions: https://docs.travis-ci.com/user/languages/objective-c#supported-xcode-versions
# env: NAME="OSX-default-cmake-cpu" WITH_CUDA=false
# sudo: required
# Mac OSX
# Mac OSX - Default - CMake - CPU
- os: osx
osx_image: xcode10.1 # Versions: https://docs.travis-ci.com/user/languages/objective-c#supported-xcode-versions
env: NAME="OSX-default-cmake-cpu" WITH_CUDA=false
sudo: required
- os: osx
osx_image: xcode9.4 # xcode10.1 does not work with Python # Versions: https://docs.travis-ci.com/user/languages/objective-c#supported-xcode-versions
env: NAME="OSX-python-cmake-cpu" WITH_CUDA=false WITH_PYTHON=true
sudo: required
# Install apt dependencies
addons:
......@@ -120,7 +124,7 @@ addons:
# Install Caffe and OP dependencies
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo bash scripts/travis/install_deps_ubuntu.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo bash scripts/travis/install_deps_osx.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash scripts/travis/install_deps_osx.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then exit 99 ; fi
# Running CMake
......
......@@ -10,6 +10,5 @@ brew install hdf5 opencv
brew install protobuf boost
brew install cmake
brew install viennacl
# Python dependencies
sudo pip install numpy opencv-python
sudo pip3 install numpy opencv-python
sudo pip install numpy
sudo pip install opencv-python
\ No newline at end of file
......@@ -15,7 +15,12 @@ fi
echo "WITH_PYTHON = ${WITH_PYTHON}."
if [[ $WITH_PYTHON == true ]] ; then
ARGS="$ARGS -DBUILD_PYTHON=On -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7m.so"
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
ARGS="$ARGS -DBUILD_PYTHON=On -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7m.so"
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
ARGS="$ARGS -DBUILD_PYTHON=On -DPYTHON_EXECUTABLE=/usr/local/bin/python2.7 -DPYTHON_LIBRARY=/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7m.dylib"
fi
fi
# CUDA version
......
#!/bin/bash
# Install dependencies for Mac OSX
echo "Running on Mac OSX."
# Install dependencies for Mac OS
echo "Running on Mac OS."
echo "Mac OSX version not implemented for Travis Build testing."
exit 99
BASEDIR=$(dirname $0)
source $BASEDIR/defaults.sh
bash scripts/osx/install_brew.sh
bash scripts/osx/install_deps.sh
......@@ -7,7 +7,9 @@ source $BASEDIR/defaults.sh
if [[ $WITH_CMAKE == true ]] ; then
cd build
make -j`nproc`
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make -j`nproc` ; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j1 ; fi
else
make all -j`nproc`
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make all -j`nproc` ; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make all -j1 ; fi
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册