forked from KordingLab/spykes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
51 lines (48 loc) · 1.97 KB
/
circle.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
machine:
environment:
# We need to set this variable to let Anaconda take precedence
PATH: "/home/ubuntu/miniconda/envs/circleenv/bin:/home/ubuntu/miniconda/bin:$PATH"
DISPLAY: ":99.0"
dependencies:
cache_directories:
- "~/spykes_data"
- "~/miniconda"
# Various dependencies
pre:
# Get a running Python
- cd ~;
# Disable pyenv (no cleaner way provided by CircleCI as it prepends pyenv version to PATH)
- rm -rf ~/.pyenv;
- rm -rf ~/virtualenvs;
# Get Anaconda and conda-based requirements
- >
if [ ! -d "/home/ubuntu/miniconda" ]; then
echo "Setting up conda";
wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O ~/miniconda.sh;
chmod +x ~/miniconda.sh;
~/miniconda.sh -b -p /home/ubuntu/miniconda;
conda update --yes --quiet conda;
conda create -n circleenv --yes pip python=2.7 pip;
sed -i "s/ENABLE_USER_SITE = .*/ENABLE_USER_SITE = False/g" /home/ubuntu/miniconda/envs/circleenv/lib/python2.7/site.py;
else
echo "Conda already set up.";
fi
- conda install -n circleenv --yes numpy scipy scikit-learn matplotlib sphinx pillow six IPython pandas;
override:
- pip install sphinx coverage
- pip install sphinx-gallery m2r sphinx_bootstrap_theme sphinx_rtd_theme
- pip install deepdish requests
- pip install -e .
# we need to do this here so the datasets will be cached
# pipefail is necessary to propagate exit codes
- set -o pipefail && cd doc && SPYKES_DATA=~/spykes_data/ make html_dev-pattern PATTERN=plot_\\\(?\\!crcns_dataset_example\\\) 2>&1 | tee ~/log.txt
test:
override:
# workaround - make html returns 0 even if examples fail to build
# (see https://github.com/sphinx-gallery/sphinx-gallery/issues/45)
- cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi
general:
artifacts:
- "doc/_build/html"
- "coverage"
- "~/log.txt"