Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis build on OSX #1183

Merged
merged 25 commits into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2a1aef0
adding an OSX build without Music and Libneurosim on Travis using Mo…
lekshmideepu Apr 18, 2019
0199c6e
moving the regression test-1034.py to pytests
lekshmideepu Apr 18, 2019
753502c
fixing the incorrect nest.init call
lekshmideepu Apr 18, 2019
e5d25b1
Added separate CMake config lines and setting explicitly the python l…
lekshmideepu Apr 18, 2019
4ee9bb3
modifying the build as MPI is OFF
lekshmideepu Apr 18, 2019
dc6be02
Update extras/travis_build.sh
jougs Apr 18, 2019
21d06fd
introducing configure variables for Boost and OSX related compiler fl…
lekshmideepu Apr 18, 2019
b6ead55
Merge branch 'OsXTravis' of https://github.com/lekshmideepu/nest-simu…
lekshmideepu Apr 18, 2019
7042474
syntax correction
lekshmideepu Apr 18, 2019
73e5d02
nicer way to fix the syntax error
lekshmideepu Apr 18, 2019
a251396
fixing the syntax finally.
lekshmideepu Apr 24, 2019
10f06c0
merging with master
lekshmideepu Apr 24, 2019
fe1c6c3
Update extras/travis_build.sh
lekshmideepu May 9, 2019
e83e29d
Merge branch 'master' into OsXTravis
lekshmideepu May 17, 2019
26a6828
Merge branch 'OsXTravis' of https://github.com/lekshmideepu/nest-simu…
lekshmideepu May 17, 2019
1006efe
removing the explicit setting of CC and CXX for OSX
lekshmideepu May 17, 2019
636fc5c
Update extras/travis_build.sh
lekshmideepu May 21, 2019
2cc7a69
checking the list of installed packages
lekshmideepu May 22, 2019
c0ec5a4
Merge branch 'OsXTravis' of https://github.com/lekshmideepu/nest-simu…
lekshmideepu May 22, 2019
6a4bf28
installing numpy using pip
lekshmideepu May 22, 2019
86a1d1c
Merge branch 'master' into OsXTravis
lekshmideepu Jun 4, 2019
74f6b09
using numpy from the apt package list
lekshmideepu Jun 4, 2019
433095d
installing numpy 1.13.3
lekshmideepu Jun 4, 2019
71b5f23
Merge branch 'master' into OsXTravis
lekshmideepu Jun 5, 2019
0b00ee6
code beautification
lekshmideepu Jun 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ stages:
- MPI-Threading-Python
- Python-Full-build
- GCC8Clang7
- OsX

# list of build stages to run. Stages with the same name get run in parallel.

Expand Down Expand Up @@ -68,7 +69,12 @@ jobs:
- stage: GCC8Clang7
language: cpp
env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"

- stage: OsX
os: osx
osx_image: xcode10.2
language: generic
env: xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_TESTSUITE=1 CACHE_NAME=JOB # Without MUSIC and Libneurosim

#https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon
addons:
apt:
Expand Down Expand Up @@ -122,6 +128,7 @@ before_install:
- echo $PATH
# Upgrade pip and setuptools
- if [[ $TRAVIS_BUILD_STAGE_NAME == "Gcc8clang7" ]]; then pyenv global 3.6.3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew --version; brew update; brew tap brewsci/science; brew tap brewsci/bio; brew install coreutils gsl open-mpi automake autoconf libtool; fi
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
- pip install -U pip
- pip install -U setuptools

Expand All @@ -137,9 +144,7 @@ install:
- which python
- python --version
- which pip
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
- which nosetests
- nosetests --version
- nosetests --plugins
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then which nosetests; nosetests --version; nosetests --plugins; fi
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
- which cmake
- cmake --version
- echo ${CC}
Expand Down
68 changes: 52 additions & 16 deletions extras/travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ if [ "$xPYTHON" = "1" ] ; then
elif [ "$TRAVIS_PYTHON_VERSION" == "3.4.4" ]; then
CONFIGURE_PYTHON="-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.4m.so -DPYTHON_INCLUDE_DIR=/opt/python/3.4.4/include/python3.4m/"
fi
if [[ $OSTYPE == darwin* ]]; then
CONFIGURE_PYTHON="-DPYTHON-LIBRARY= /usr/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7"
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
fi
else
CONFIGURE_PYTHON="-Dwith-python=OFF"
fi
Expand Down Expand Up @@ -94,11 +97,15 @@ else
CONFIGURE_LIBNEUROSIM="-Dwith-libneurosim=OFF"
fi


NEST_VPATH=build
NEST_RESULT=result
NEST_RESULT=$(readlink -f $NEST_RESULT)
if [ "$(uname -s)" = 'Linux' ]; then
NEST_RESULT=$(readlink -f $NEST_RESULT)
else
NEST_RESULT=$(greadlink -f $NEST_RESULT)
fi

echo $NEST_VPATH
mkdir "$NEST_VPATH" "$NEST_RESULT"
mkdir "$NEST_VPATH/reports"

Expand Down Expand Up @@ -205,26 +212,55 @@ fi # End of Static code analysis.

cd "$NEST_VPATH"
cp ../examples/sli/nestrc.sli ~/.nestrc
# Fix for the Open-mpi slot error when using Open-mpi>3.0
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
if [[ "$OSTYPE" == "darwin"* ]] ; then
sed -i -e 's/mpirun -np/mpirun --oversubscribe -np/g' ~/.nestrc
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
fi

echo
echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
echo "+ C O N F I G U R E N E S T B U I L D +"
echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
echo "MSGBLD0230: Configuring CMake."
cmake \
-DCMAKE_INSTALL_PREFIX="$NEST_RESULT" \
-Dwith-optimize=ON \
-Dwith-warning=ON \
-Dwith-boost=ON \
$CONFIGURE_THREADING \
$CONFIGURE_MPI \
$CONFIGURE_PYTHON \
$CONFIGURE_MUSIC \
$CONFIGURE_GSL \
$CONFIGURE_LTDL \
$CONFIGURE_READLINE \
$CONFIGURE_LIBNEUROSIM \
..
if [[ "$OSTYPE" == "darwin"* ]] ; then
cmake \
-DCMAKE_INSTALL_PREFIX="$NEST_RESULT" \
-Dwith-optimize=ON \
-Dwith-warning=ON \
-Dwith-boost=OFF \
-DCMAKE_C_COMPILER=/usr/local/opt/gcc/bin/gcc-8 \
-DOpenMP_C_FLAGS="-fopenmp -I/usr/local/opt/libomp/include" \
-DOpenMP_C_LIB_NAMES="omp" \
-DOpenMP_omp_LIBRARY=/usr/local/opt/libomp \
-DCMAKE_CXX_COMPILER=/usr/local/opt/gcc/bin/g++-8 \
-DOpenMP_CXX_FLAGS="-fopenmp -I/usr/local/opt/libomp/include" \
-DOpenMP_CXX_LIB_NAMES="omp" \
-D_GLIBCXX_USE_CXX11_ABI=0 \
$CONFIGURE_THREADING \
lekshmideepu marked this conversation as resolved.
Show resolved Hide resolved
$CONFIGURE_MPI \
$CONFIGURE_PYTHON \
$CONFIGURE_MUSIC \
$CONFIGURE_GSL \
$CONFIGURE_LTDL \
$CONFIGURE_READLINE \
$CONFIGURE_LIBNEUROSIM \
..
else
cmake \
-DCMAKE_INSTALL_PREFIX="$NEST_RESULT" \
-Dwith-optimize=ON \
-Dwith-warning=ON \
-Dwith-boost=ON \
$CONFIGURE_THREADING \
$CONFIGURE_MPI \
$CONFIGURE_PYTHON \
$CONFIGURE_MUSIC \
$CONFIGURE_GSL \
$CONFIGURE_LTDL \
$CONFIGURE_READLINE \
$CONFIGURE_LIBNEUROSIM \
..
fi
echo "MSGBLD0240: CMake configure completed."

echo
Expand Down
2 changes: 1 addition & 1 deletion pynest/do_tests.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _setup(arg):


import nest
nest.init(["--verbosity=WARNING", "--quiet"])
nest.ll_api.init(["--verbosity=WARNING", "--quiet"])

import nest.topology

Expand Down