Skip to content

Commit e4d3cff

Browse files
authored
Merge pull request #235 from larsoner/circle
MRG: CircleCI 2.0
2 parents b02dc93 + 7ed4ac9 commit e4d3cff

File tree

4 files changed

+80
-82
lines changed

4 files changed

+80
-82
lines changed

.circleci/config.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: circleci/python:3.6-stretch
6+
steps:
7+
# Get our data and merge with upstream
8+
- checkout
9+
- run: echo $(git log -1 --pretty=%B) | tee gitlog.txt
10+
- run: echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
11+
- run:
12+
command: |
13+
if [[ $(cat merge.txt) != "" ]]; then
14+
echo "Merging $(cat merge.txt)";
15+
git pull --ff-only origin "refs/pull/$(cat merge.txt)/merge";
16+
fi
17+
18+
# Load our data
19+
- restore_cache:
20+
keys:
21+
- data-cache
22+
23+
- run: echo "export SUBJECTS_DIR=$HOME/subjects" >> $BASH_ENV
24+
- run: echo "export DISPLAY=:99" >> $BASH_ENV
25+
- run: /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset;
26+
# Get latest Anaconda running
27+
- run: echo "export PATH=~/miniconda/envs/mne/bin:~/miniconda/bin:$PATH" >> $BASH_ENV
28+
- run:
29+
command: |
30+
wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O ~/miniconda.sh;
31+
chmod +x ~/miniconda.sh;
32+
~/miniconda.sh -b -p ~/miniconda;
33+
- run:
34+
command: |
35+
conda update --yes --quiet conda;
36+
conda env create --quiet -f environment.yml;
37+
38+
- run: pip install sphinx numpydoc https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master
39+
# This is a CircleCI-specific fix -- for some reason 5.9.2 is problematic
40+
# here but not on Travis, we get:
41+
#
42+
# libgcc_s.so.1 must be installed for pthread_cancel to work
43+
# Aborted
44+
#
45+
- run: pip install --upgrade --no-deps pyqt5>=5.10
46+
- run: python -c "from mayavi import mlab; import matplotlib.pyplot as plt; mlab.figure(); plt.figure()"
47+
- run: python setup.py develop
48+
- run: echo $SUBJECTS_DIR
49+
- run:
50+
command: |
51+
if [ ! -d $SUBJECTS_DIR ]; then
52+
mkdir $SUBJECTS_DIR;
53+
cd $SUBJECTS_DIR;
54+
wget http://faculty.washington.edu/larsoner/fsaverage_min.zip;
55+
unzip fsaverage_min.zip;
56+
rm fsaverage_min.zip;
57+
fi;
58+
- run: ls $SUBJECTS_DIR
59+
- run:
60+
command: |
61+
if [[ $(cat build.txt) == "html_dev" ]] || [[ $(cat build.txt) == "html_stable" ]]; then
62+
SUBJECTS_DIR=~/mne_data/MNE-sample-data/subjects python -c "import mne; mne.datasets._download_all_example_data()";
63+
fi;
64+
- run: cd doc && sphinx-build -D plot_gallery=1 -D sphinx_gallery_conf.filename_pattern=^\(\(?\!plot_fmri_activation_volume\|plot_morphometry\|plot_label\|plot_probabilistic_label\|plot_resting_correlations\|plot_transparent_brain\|rotate_animation\|save_movie\|save_views\).\)*\$ -b html -d _build/doctrees . _build/html
65+
66+
- store_artifacts:
67+
path: doc/_build/html/
68+
destination: html
69+
70+
- save_cache:
71+
key: data-cache
72+
paths:
73+
- "~/subjects"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ pysurfer.egg-info
2626
.tmp/*.png
2727
examples/example_data/coord-lh.label
2828
.ipynb_checkpoints/
29+
.cache/

circle.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

environment.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ dependencies:
88
- numpy
99
- scipy
1010
- matplotlib
11-
- pyqt=5
11+
- pyqt>=5.9
12+
- vtk>=8
1213
- nose
1314
- coverage
1415
- pytest
1516
- pytest-cov
1617
- flake8
1718
- pygments
1819
- pip:
19-
- vtk
20-
- "git+https://github.com/enthought/traits.git@a7a83182048c08923953e302658b51b68c802132"
21-
- "git+https://github.com/enthought/pyface.git@13a064de48adda3c880350545717d8cf8929afad"
22-
- "git+https://github.com/enthought/traitsui.git@ee8ef0a34dfc1db18a8e2c0301cc18d96b7a3e2f"
23-
- "git+https://github.com/enthought/mayavi.git"
20+
- "https://api.github.com/repos/enthought/traits/zipball/a99b3f64d50c5f7f28ffc01bf69419b061f9e976"
21+
- "https://api.github.com/repos/enthought/pyface/zipball/6a0cac149d56293482bb828a7d98122667c773be"
22+
- "https://api.github.com/repos/enthought/traitsui/zipball/e366ad3886d3c39bedb96e83bab447d31c4ab725"
23+
- "https://api.github.com/repos/enthought/mayavi/zipball/master"
2424
- nibabel
2525
- pytest-sugar
2626
- pytest-faulthandler

0 commit comments

Comments
 (0)