forked from SENeC-Initiative/DeNSE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
97 lines (89 loc) · 2.87 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
language: python
dist: bionic
sudo: required
env:
global:
- DO_PLOT=0
matrix:
include:
- env: PYTHON_VERSION=2.7
os: linux
python: "2.7"
- env: PYTHON_VERSION=3.6
os: linux
python: "3.6"
- env: PYTHON_VERSION=3
os: osx
osx_image: xcode10
language: generic
- env: PYTHON_VERSION=3
os: windows
language: shell
cache:
- apt
- pip
before_install:
# update apt and pip packages
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
echo $VIRTUAL_ENV;
sudo rm -rf /var/lib/apt/lists/*;
sudo apt-get update -qq;
sudo apt-get autoremove;
sudo apt-get install -y cmake libboost-dev libgeos++-dev g++;
pip install setuptools cython;
pip install numpy scipy pint pytest nngt networkx pyneuroml svg.path dxfgrabber PyOpenGL matplotlib;
pip install --no-binary shapely, shapely;
fi
# update brew and pip on mac (note that mac is without nngt)
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install gcc@8 cmake python3 geos doxygen boost libomp;
pip3 install setuptools;
pip3 install cython;
pip3 install numpy scipy pint pyneuroml pytest;
pip3 install --no-binary shapely, shapely;
pip3 install matplotlib networkx svg.path dxfgrabber PyOpenGL;
fi
# use miniconda on windows
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
choco install openssl.light;
choco install miniconda3 --params="'/AddToPath:1'";
export PATH="/c/tools/miniconda3:/c/tools/miniconda3/Scripts:/c/tools/miniconda3/Library/bin:/c/tools/miniconda3/bin:$PATH";
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
conda install python cmake geos boost;
conda --version ; python --version ; pip --version;
pip install cython;
pip install scipy numpy matplotlib pytest shapely pint PyOpenGL svg.path dxfgrabber networkx pyneuroml;
pip install nngt;
fi
install:
# on linux, install in the virtualenv
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
mkdir build && cd build;
cmake .. -DCMAKE_INSTALL_PREFIX=$VIRTUAL_ENV;
make && make install;
fi
# on mac, set gcc as compiler
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
mkdir build && cd build;
CC=gcc-8 CXX=g++-8 cmake .. -Dwith-python=3;
make;
CC=gcc-8 CXX=g++-8 make install;
fi
# on windows, installer works fine
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
mkdir build && cd build;
set DISTUTILS_USE_SDK 1;
cmake .. -DCMAKE_GENERATOR_PLATFORM=x64;
cmake --build . --config Release --target INSTALL;
fi;
script:
# we were in extra for WINDOWS, and in build for MAC and LINUX, so swith back to root folder
- cd ..
# run tests
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
python3 -m pytest tests --ignore=tests/todo;
else
python -m pytest tests --ignore=tests/todo;
fi;