forked from INM-6/elephant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (66 loc) · 2.46 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
dist: bionic
language: python
sudo: false
addons:
apt:
update: true
matrix:
include:
- name: "conda 3.6 extras,opencl"
python: 3.6
env: DISTRIB="conda"
before_install: sudo apt install -y libopenmpi-dev openmpi-bin
before_script:
- conda install -c conda-forge pyopencl oclgrind clang=9.0.1
- pip install -r requirements/requirements-extras.txt
- pip install mpi4py
script: mpiexec -n 1 python -m mpi4py.futures -m pytest --cov=elephant --import-mode=importlib
after_success: coveralls || echo "coveralls failed"
- name: "conda 3.7"
python: 3.7
env: DISTRIB="conda"
- name: "conda 3.8"
python: 3.8
env: DISTRIB="conda"
- name: "pip 3.9"
python: 3.9
env: DISTRIB="pip"
- name: "docs"
python: 3.6
env: DISTRIB="conda"
before_install: sudo apt install -y libopenmpi-dev openmpi-bin
before_script:
- conda install -c conda-forge pandoc
- pip install -r requirements/requirements-docs.txt
- pip install -r requirements/requirements-tutorials.txt
- pip install -r requirements/requirements-extras.txt
- pip install mpi4py
- pip install viziphant # remove viziphant, once integrated into requirements-tutorials.txt
- sed -i -E "s/nbsphinx_execute *=.*/nbsphinx_execute = 'always'/g" doc/conf.py
script: cd doc && make html
install:
- if [[ "${DISTRIB}" == "conda" ]];
then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
source "$HOME/miniconda/etc/profile.d/conda.sh";
conda config --set always_yes yes;
conda update conda;
sed -i "s/python>=[0-9]\.[0-9]/python=${TRAVIS_PYTHON_VERSION}/g" requirements/environment.yml;
sed -i '/mpi4py/d' requirements/environment.yml;
conda env create -f requirements/environment.yml;
conda activate elephant;
conda list;
else
pip install -r requirements/requirements.txt;
fi
- pip -V
- pip install -r requirements/requirements-tests.txt
- pip install pytest-cov coveralls
- pip install .
- python -c "import sys; sys.path.remove(''); import elephant; print(elephant.__file__, elephant.__version__)"
- python -c "import sys; sys.path.remove(''); from elephant.spade import HAVE_FIM; assert HAVE_FIM"
- pip list
- python --version
script:
pytest --cov=elephant --import-mode=importlib