Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
2dd9688
Don't run streamer multitab tests on OSX/Travis.
Feb 13, 2019
3520120
Disable all socket streamer tests.
Feb 13, 2019
740fb44
Merge branch 'master' of github.com:BhallaLab/moose-core
dilawar Mar 7, 2019
45216b3
Merge branch 'master' of github.com:dilawar/moose-core
dilawar Apr 19, 2019
c319cb4
Merge branch 'master' of github.com:BhallaLab/moose-core into devel
dilawar Apr 19, 2019
1bbbc2d
added moose.about(). Show essential information about moose project
dilawar Apr 19, 2019
62b311c
Add .gitlab-ci.yml
dilawar May 21, 2019
cf45cc3
Update .gitlab-ci.yml
dilawar May 21, 2019
ebfb5dc
Merge branch 'master' of https://github.com/dilawar/moose-core
Jun 2, 2019
27f62f5
Merge branch 'master' of github.com:dilawar/moose-core
Jun 3, 2019
9e0b0d1
- Make python3 default python.
Jan 31, 2020
69a3aae
Fixes for gcc5 series. It is not smart enough to figure out which fie…
dilawar Jan 31, 2020
7453901
Create cmake.yml
dilawar Feb 1, 2020
f471483
Updated commands.
dilawar Feb 1, 2020
08950de
removing github actions.
dilawar Feb 1, 2020
06aa508
Create build.yml
dilawar Feb 1, 2020
2cf3294
Added sudo ...
dilawar Feb 1, 2020
1998950
Run sudo apt-update ...
dilawar Feb 1, 2020
0768916
Fixed the name of package...
dilawar Feb 1, 2020
3502f13
Fixed make and test targets.
dilawar Feb 1, 2020
f089c1c
Added workflow file.
dilawar Feb 1, 2020
749f1b8
Update build.yml
dilawar Feb 1, 2020
6a7de61
Merge branch 'master' of https://github.com/dilawar/moose-core
Feb 1, 2020
7a8f52d
Merge branch 'devel' of https://github.com/dilawar/moose-core into devel
Feb 1, 2020
18e65d5
Using python setup.py to build the module.
Feb 1, 2020
4d8342e
Not yet complete because we still don't have static linking to gsl .
Feb 1, 2020
8bee4d0
Temp commit: Build locally.
Feb 1, 2020
ac30142
Run in inside a docker image to tweak.
dilawar Feb 3, 2020
5777ede
Some more tweaks.
dilawar Feb 3, 2020
892b9c3
Added centos build docker file.
dilawar Feb 3, 2020
4408bee
Docker build was successful. Needs to improve test function...
dilawar Feb 3, 2020
9f475b3
Added centos build docker file.
dilawar Feb 3, 2020
9a14b5c
Minor tweaks...
Feb 4, 2020
a3d25aa
Some more tweaks.
Feb 4, 2020
6248e12
Added command test to setup.py which calls ctest.
Feb 4, 2020
3605566
Temp commit.
Feb 4, 2020
82adc1c
Removed the target_link_directories command which is available only in
Feb 4, 2020
2f0d93a
Added docker-file for suse.
Feb 4, 2020
71c9756
Updated cmake file; build directory is now part of directories to
Feb 4, 2020
cb0095f
Merge branch 'devel' of https://github.com/dilawar/moose-core
dilawar Feb 5, 2020
a4a2338
Update build.yml
dilawar Feb 5, 2020
2a81096
Merge remote-tracking branch 'bhallalab/master'
dilawar Feb 5, 2020
ecdc1a8
Use latest xcode.
dilawar Feb 5, 2020
4fe34a5
Squashed commit of the following:
dilawar Feb 5, 2020
6b87396
Setup.py works with both python2 and python3.
Feb 5, 2020
8058ede
Using timer to timeout the test. This removes a very old bug..
Feb 5, 2020
f26d0cc
Removing old tests; move them to moose-examples.
Feb 5, 2020
3667a00
matplotlib is always optional for tests.
Feb 5, 2020
0c3f743
setup.py seems to be building just fine. Needs tweaking in the tests.
Feb 5, 2020
7be23ed
Using setup.py file to build and install pymoose.
Feb 5, 2020
14529ca
Fixes to github actions..
Feb 5, 2020
6dd377c
Fixes to YAML file.
Feb 5, 2020
ca29d6b
Create pymoose.yml
dilawar Feb 5, 2020
5d4c5ec
Some more fixes to github workflows.
Feb 5, 2020
7da6a98
Install dependencies...
Feb 5, 2020
3e69fe7
Updated a bit more ...
Feb 5, 2020
347353b
make debian fronend non-interactive...
Feb 5, 2020
ddebb11
Added missing dependencies.
Feb 5, 2020
af3b1ec
Use pip to install numpy/matplotlib before build.
Feb 5, 2020
287a26a
Remove build tests here. [skip ci]
Feb 5, 2020
f3f0b8e
Update .gitlab-ci.yml
dilawar Feb 5, 2020
e852b49
Squashed commit of the following:
Feb 5, 2020
b32c33d
Merge branch 'master' of https://github.com/dilawar/moose-core
Feb 5, 2020
b1751e2
Added pipeline.
Feb 5, 2020
ba65d46
Merge remote-tracking branch 'origin/setup.py'
Feb 5, 2020
d44d049
Added missing setuptools. Update setuptools before building.
Feb 5, 2020
e98b91f
Install python-dev in dependencies...
Feb 5, 2020
f1df650
Non-zero cpu count...
Feb 5, 2020
7440e9d
Updated gitlab CI.
Feb 5, 2020
593f10f
Merge branch 'master' of https://gitlab.com/dilawar/moose-core
Feb 5, 2020
118efb0
Added scripts to build wheels.
Feb 5, 2020
76c3930
Create dockerimage.yml
dilawar Feb 6, 2020
2b4bd1d
Fixes the build failure on CentOS6.
Feb 6, 2020
26ce25f
Squashed commit of the following:
Feb 7, 2020
4163946
Removed dockerimage workflow for now [skip ci]
Feb 7, 2020
13d98c2
Minor tweaks to test on travis. Fixes FindGSL.cmake script. if(expr1
Feb 7, 2020
a1d8b91
Use a temp build directory.
Feb 7, 2020
c46a458
Need a better way to create sdist.
dilawar Feb 8, 2020
8dfae0d
Create stale.yml
dilawar Feb 9, 2020
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
8 changes: 8 additions & 0 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Run this script from top directory
# docker build . --file .ci/Dockerfile --tag bhallalab/build-wheels:$(date +%s)
FROM bhallalab/python-wheels:latest
MAINTAINER Dilawar Singh <[email protected]>
WORKDIR /root
COPY . /root/moose-core/
# RUN ./build_wheels.sh
CMD [ "./build_wheels.sh" ]
94 changes: 94 additions & 0 deletions .ci/build_wheels_osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/bin/bash
set -e
set -x

BRANCH=$(cat ./BRANCH)
VERSION=3.2.dev$(date +%Y%m%d)

# Just to be sure on homebrew.
export PATH=/usr/local/bin:$PATH

brew update || echo "Failed to update brew"
brew install gsl || brew upgrade gsl
brew upgrade python3 || echo "Failed to upgrade python3"
brew upgrade python2 || echo "Failed to upgrade python2"
brew upgrade python || echo "Failed to upgrade python"

# Following are to remove numpy; It is breaking the build on Xcode9.4.
brew uninstall gdal postgis || echo "Failed to uninstall gdal/postgis"
brew uninstall numpy || echo "Failed to uninstall numpy"

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

MOOSE_SOURCE_DIR=`pwd`/moose-core

if [ ! -d $MOOSE_SOURCE_DIR ]; then
git clone https://github.com/BhallaLab/moose-core -b $BRANCH --depth 10
fi
cd moose-core && git pull
WHEELHOUSE=$HOME/wheelhouse
mkdir -p $WHEELHOUSE
# Current version 0.7.4 seems to be broken with python3.7 .
# See https://travis-ci.org/BhallaLab/deploy/jobs/435219820
sudo /usr/local/bin/python -m pip install delocate virtualenv
sudo /usr/local/bin/python3 -m pip install delocate virtualenv
DELOCATE_WHEEL=/usr/local/bin/delocate-wheel

# Always prefer brew version.
for _py in 3 2; do
PYTHON=/usr/local/bin/python$_py

if [ ! -f $PYTHON ]; then
echo "Not found $PYTHON"
continue
fi

$PYTHON -m pip install setuptools --upgrade --user
$PYTHON -m pip install wheel --upgrade --user
$PYTHON -m pip install numpy --upgrade --user
$PYTHON -m pip install twine --upgrade --user

PLATFORM=$($PYTHON -c "import distutils.util; print(distutils.util.get_platform())")

(
cd $MOOSE_SOURCE_DIR
BUILDDIR=_build_$_py
mkdir -p $BUILDDIR && cd $BUILDDIR
echo " -- Building wheel for $PLATFORM"
cmake -DVERSION_MOOSE=$VERSION -DPYTHON_EXECUTABLE=$PYTHON ..

make -j4
(
cd python
ls *.py
sed "s/from distutils.*setup/from setuptools import setup/g" \
setup.cmake.py > setup.wheel.py
$PYTHON setup.wheel.py bdist_wheel -p $PLATFORM
# Now fix the wheel using delocate.
$DELOCATE_WHEEL -w $WHEELHOUSE -v dist/*.whl
)

ls $WHEELHOUSE/pymoose*-py${_py}-*.whl

# create a virtualenv and test this.
rm -rf $HOME/Py${_py}
(
python3 -m virtualenv -p $PYTHON $HOME/Py${_py}
source $HOME/Py${_py}/bin/activate
set +x
python -m pip install $WHEELHOUSE/pymoose*-py${_py}-*.whl
echo "Testing wheel in virtualenv"
which python
python --version
python -c 'import moose; print( moose.__version__ )'
deactivate
set -x
)
)

if [ ! -z "$PYPI_PASSWORD" ]; then
echo "Did you test the wheels? I am uploading anyway ..."
$PYTHON -m twine upload -u bhallalab -p $PYPI_PASSWORD \
$HOME/wheelhouse/pymoose*.whl || echo "Failed to upload to PyPi"
fi
done
File renamed without changes.
File renamed without changes.
File renamed without changes.
65 changes: 65 additions & 0 deletions .ci/travis_build_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
#
# DESCRIPTION: Build on linux environment.
#
# AUTHOR: Dilawar Singh (), [email protected]
# ORGANIZATION: NCBS Bangalore
# CREATED: 01/02/2017 10:11:46 AM

set -e
set -x

PYTHON2="/usr/bin/python2"
PYTHON3="/usr/bin/python3"

$PYTHON2 -m pip install pip --upgrade --user
$PYTHON2 -m pip install libNeuroML pyNeuroML --upgrade --user

$PYTHON3 -m pip install pip --upgrade --user
$PYTHON3 -m pip install libNeuroML pyNeuroML --upgrade --user

NPROC=$(nproc)
MAKE="make -j$NPROC"

unset PYTHONPATH

# Bug: `which python` returns /opt/bin/python* etc on travis. For which numpy
# many not be available. Therefore, it is neccessary to use fixed path for
# python executable.

$PYTHON2 -m compileall -q .
$PYTHON3 -m compileall -q .

# Python3 with GSL.
echo "Python3: Removed python2-networkx and install python3"

# GSL.
(
mkdir -p _GSL_BUILD_PY3 && cd _GSL_BUILD_PY3 && \
cmake -DPYTHON_EXECUTABLE=$PYTHON3 \
-DCMAKE_INSTALL_PREFIX=/usr -DDEBUG=ON ..
$MAKE && ctest -j$NPROC --output-on-failure -E ".*socket_streamer.*"
make install || sudo make install
cd /tmp
$PYTHON3 -c 'import moose;print(moose.__file__);print(moose.version())'
)

# BOOST and python3
(
mkdir -p _BOOST_BUILD_PY3 && cd _BOOST_BUILD_PY3 && \
cmake -DWITH_BOOST_ODE=ON -DPYTHON_EXECUTABLE="$PYTHON3" \
-DCMAKE_INSTALL_PREFIX=/usr ..
$MAKE && ctest -j$NPROC --output-on-failure -E ".*socket_streamer.*"
)

# GSL and python2, failure is allowed
set +e
(
BUILDDIR=_GSL_PY2
mkdir -p $BUILDDIR && cd $BUILDDIR && \
cmake -DPYTHON_EXECUTABLE=$PYTHON2 -DCMAKE_INSTALL_PREFIX=/usr ..
$MAKE && ctest -j$NPROC --output-on-failure -E ".*socket_streamer.*"
)
set -e

echo "All done"
12 changes: 4 additions & 8 deletions .travis/travis_build_osx.sh → .ci/travis_build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -o nounset # Treat unset variables as an error
set -e

# NOTE: On travis, don't enable -j`nproc` option. It may not compile properly.

NPROC=$(nproc)
(
# Make sure not to pick up python from /opt.
PATH=/usr/local/bin:/usr/bin:$PATH
Expand All @@ -37,18 +37,14 @@ set -e
&& cmake -DDEBUG=ON \
-DPYTHON_EXECUTABLE=$PYTHON3 \
..
make pylint -j3
make && ctest --output-on-failure
make pylint -j$NPROC
make -j$NPROC && ctest --output-on-failure -$NPROC

cd .. # Now with boost.
mkdir -p _BOOST_BUILD && cd _BOOST_BUILD \
&& cmake -DWITH_BOOST_ODE=ON -DDEBUG=ON \
-DPYTHON_EXECUTABLE=`which python3` ..

make -j4 && ctest --output-on-failure
cd ..
set +e

make -j$NPROC && ctest -j$NPROC --output-on-failure
)
set +e

30 changes: 30 additions & 0 deletions .ci/travis_prepare_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -
#
# DESCRIPTION: Prepare linux build environment on travis.
# NOTES: Always run with sudo permission.
# AUTHOR: Dilawar Singh (), [email protected]
# ORGANIZATION: NCBS Bangalore
# CREATED: 01/02/2017 10:10:02 AM

set -e -x
apt update
apt-get install -qq libxml2-dev libbz2-dev
apt-get install -qq make cmake
apt-get install -qq python-numpy python-matplotlib python-networkx python-pip
apt-get install -qq python3-numpy python3-matplotlib python3-networkx python3-pip
apt-get install -qq python-tk python3-tk

# Gsl
apt-get install -qq libgsl0-dev || apt-get install -qq libgsl-dev

# Boost related.
apt-get install -qq liblapack-dev
apt-get install -qq libboost-all-dev

# Dependencies for NML2
apt-get install -qq python-scipy python3-scipy
apt-get install -qq python-lxml python3-lxml
apt-get install -qq python-setuptools python3-setuptools

# Install twine
python3 -m pip install twine
File renamed without changes.
25 changes: 25 additions & 0 deletions .docker/centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM centos:7
MAINTAINER Dilawar Singh <[email protected]>

# Install dependencies.
RUN yum -y update && yum -y install epel-release && yum -y update \
&& yum -y clean all --enablerepo='*'
RUN yum install -y git cmake3 gcc gcc-c++ make \
python3 python3-devel python3-setuptools python3-numpy \
&& yum -y clean all --enablerepo='*'
RUN yum install -y gsl-devel \
&& yum -y clean all --enablerepo='*'
# These are required to run tests.
RUN yum install -y python3-matplotlib python3-networkx graphviz python3-scipy \
&& yum -y clean all --enablerepo='*'
RUN yum install -y python-matplotlib python-networkx python-scipy python-numpy \
&& yum -y clean all --enablerepo='*'
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
RUN ln -s /usr/bin/ctest3 /usr/bin/ctest
WORKDIR /home/root
# RUN git clone https://github.com/dilawar/moose-core -b devel
# Run docker build from outside
COPY . moose-core
RUN cd moose-core && python3 setup.py build test install
RUN cd moose-core && python2 setup.py build test install
CMD ["/usr/bin/python3", "-c", "'import moose;moose.test()'"]
18 changes: 18 additions & 0 deletions .docker/centos/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
NAME:=dilawars/centos-moose
VERSION:=$(shell date +%Y.%m.%d)

PROJECT_ROOT_DIR:=(PWD)/../..

all : build

build : Dockerfile
cd ../../ && docker build -t $(NAME):$(VERSION) -f $(PWD)/Dockerfile .
cd ../../ && docker build -t $(NAME):latest -f $(PWD)/Dockerfile .

upload :
docker push $(NAME):$(VERSION)
docker push $(NAME):latest

run :
docker run -ti $(NAME):$(VERSION) bash

18 changes: 18 additions & 0 deletions .docker/opensuse/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM opensuse/leap
MAINTAINER Dilawar Singh <[email protected]>

# Install dependencies.
RUN zypper install -y git cmake gcc gcc-c++ make \
python3 python3-devel python3-setuptools python3-numpy-devel \
&& rm -rf /var/cache/zypp/packages/*
RUN zypper install -y gsl-devel \
&& rm -rf /var/cache/zypp/packages/*
# These are required to run tests.
RUN zypper install -y python3-matplotlib python3-networkx graphviz python3-scipy \
&& rm -rf /var/cache/zypp/packages/*
WORKDIR /home/root
# RUN git clone https://github.com/dilawar/moose-core -b devel
# Run docker build from outside
COPY . moose-core
RUN cd moose-core && python3 setup.py build test install
CMD ["/usr/bin/python3", "-c", "'import moose;moose.test()'"]
18 changes: 18 additions & 0 deletions .docker/opensuse/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
NAME:=dilawars/centos-moose
VERSION:=$(shell date +%Y.%m.%d)

PROJECT_ROOT_DIR:=(PWD)/../..

all : build

build : Dockerfile
cd ../../ && docker build -t $(NAME):$(VERSION) -f $(PWD)/Dockerfile .
cd ../../ && docker build -t $(NAME):latest -f $(PWD)/Dockerfile .

upload :
docker push $(NAME):$(VERSION)
docker push $(NAME):latest

run :
docker run $(NAME):$(VERSION) /bin/bash -c "python3 -c 'import moose; moose.test()'"

11 changes: 11 additions & 0 deletions .docker/travis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:xenial
MAINTAINER Dilawar Singh <[email protected]>

# Install dependencies.
RUN apt update && apt install -y git cmake gcc g++ make vim-athena \
&& rm -rf /var/lib/apt/lists/*

RUN git config --global user.name "Dilawar Singh" \
&& git config --global user.email "[email protected]"
RUN git clone https://github.com/dilawar/vim ~/.vim -b minimal --depth 1
WORKDIR /root
18 changes: 18 additions & 0 deletions .docker/travis/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
NAME:=dilawars/moose-travis
VERSION:=$(shell date +"%Y%m%d")

PROJECT_ROOT_DIR:=(PWD)/../..

all : build

build : Dockerfile
docker build -t $(NAME):$(VERSION) .
docker build -t $(NAME):latest .

upload :
docker push $(NAME):$(VERSION)
docker push $(NAME):latest

run :
docker run -it $(NAME):latest bash

23 changes: 23 additions & 0 deletions .docker/wheel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM quay.io/pypa/manylinux2010_x86_64

ARG PYPI_PASSWORD

MAINTAINER Dilawar Singh <[email protected]>
ENV PATH=/usr/local/bin:$PATH
RUN yum update -y
RUN yum install -y cmake3 wget curl && yum clean all
RUN ln -s /usr/bin/cmake3 /usr/local/bin/cmake
RUN ln -s /usr/bin/ctest3 /usr/local/bin/ctest
RUN curl -O https://ftp.gnu.org/gnu/gsl/gsl-2.4.tar.gz \
&& tar xvf gsl-2.4.tar.gz \
&& cd gsl-2.4 \
&& CFLAGS=-fPIC ./configure --enable-static && make $MAKEOPTS \
&& make install \
&& cd ..
RUN yum install -y git vim && yum clean all
RUN git config --global user.name 'Dilawar Singh' \
&& git config --global user.email '[email protected]' \
&& git clone https://github.com/dilawar/vim ~/.vim -b minimal
WORKDIR /root
COPY ./build_wheels.sh /root
COPY ./test_and_upload.sh /root
16 changes: 16 additions & 0 deletions .docker/wheel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
VERSION := 3.2.dev$(shell date +"%Y%m%d")

all : wheels

DOCKERFILE:="bhallalab/python-wheels"

wheels : ./Dockerfile
docker build -t $(DOCKERFILE):$(VERSION) .
docker build -t $(DOCKERFILE):latest .

upload:
docker push $(DOCKERFILE):$(VERSION)
docker push $(DOCKERFILE):latest

run:
docker run -it $(DOCKERFILE):latest bash
3 changes: 3 additions & 0 deletions .docker/wheel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This docker image can be used to build pymoose wheels.

This image is based on manylinux_2010 https://www.python.org/dev/peps/pep-0571/.
Loading