Skip to content

Commit

Permalink
FIX: CircleCI 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Apr 18, 2018
1 parent b02dc93 commit 4cb0c15
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 82 deletions.
71 changes: 71 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6-stretch
steps:
# Get our data and merge with upstream
- checkout
- run: echo $(git log -1 --pretty=%B) | tee gitlog.txt
- run: echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
- run:
command: |
if [[ $(cat merge.txt) != "" ]]; then
echo "Merging $(cat merge.txt)";
git pull --ff-only origin "refs/pull/$(cat merge.txt)/merge";
fi
# Load our data
- restore_cache:
keys:
- data-cache

- run: echo "export SUBJECTS_DIR=$HOME/subjects" >> $BASH_ENV
- run: echo "export DISPLAY=:99" >> $BASH_ENV
- 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;
# Get latest Anaconda running
- run: echo "export PATH=~/miniconda/envs/mne/bin:~/miniconda/bin:$PATH" >> $BASH_ENV
- run:
command: |
wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O ~/miniconda.sh;
chmod +x ~/miniconda.sh;
~/miniconda.sh -b -p ~/miniconda;
- run:
command: |
conda update --yes --quiet conda;
conda env create --quiet -f environment.yml;
# This is a CircleCI-specific fix -- for some reason 5.9.2 is problematic
# here but not on Travis, we get:
#
# libgcc_s.so.1 must be installed for pthread_cancel to work
# Aborted
#
- run: pip install --upgrade --no-deps pyqt5>=5.10
- run: python -c "from mayavi import mlab; import matplotlib.pyplot as plt; mlab.figure(); plt.figure()"
- run: python setup.py develop
- run: echo $SUBJECTS_DIR
- run:
command: |
if [ ! -d $SUBJECTS_DIR ]; then
mkdir $SUBJECTS_DIR;
cd $SUBJECTS_DIR;
wget http://faculty.washington.edu/larsoner/fsaverage_min.zip;
unzip fsaverage_min.zip;
rm fsaverage_min.zip;
fi;
- run: ls $SUBJECTS_DIR
- run:
command: |
if [[ $(cat build.txt) == "html_dev" ]] || [[ $(cat build.txt) == "html_stable" ]]; then
SUBJECTS_DIR=~/mne_data/MNE-sample-data/subjects python -c "import mne; mne.datasets._download_all_example_data()";
fi;
- 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

- store_artifacts:
path: doc/_build/html/
destination: html

- save_cache:
key: data-cache
paths:
- "~/subjects"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ pysurfer.egg-info
.tmp/*.png
examples/example_data/coord-lh.label
.ipynb_checkpoints/
.cache/
76 changes: 0 additions & 76 deletions circle.yml

This file was deleted.

12 changes: 6 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ dependencies:
- numpy
- scipy
- matplotlib
- pyqt=5
- pyqt>=5.9
- vtk>=8
- nose
- coverage
- pytest
- pytest-cov
- flake8
- pygments
- pip:
- vtk
- "git+https://github.com/enthought/traits.git@a7a83182048c08923953e302658b51b68c802132"
- "git+https://github.com/enthought/pyface.git@13a064de48adda3c880350545717d8cf8929afad"
- "git+https://github.com/enthought/traitsui.git@ee8ef0a34dfc1db18a8e2c0301cc18d96b7a3e2f"
- "git+https://github.com/enthought/mayavi.git"
- "https://api.github.com/repos/enthought/traits/zipball/a99b3f64d50c5f7f28ffc01bf69419b061f9e976"
- "https://api.github.com/repos/enthought/pyface/zipball/6a0cac149d56293482bb828a7d98122667c773be"
- "https://api.github.com/repos/enthought/traitsui/zipball/e366ad3886d3c39bedb96e83bab447d31c4ab725"
- "https://api.github.com/repos/enthought/mayavi/zipball/master"
- nibabel
- pytest-sugar
- pytest-faulthandler
Expand Down

0 comments on commit 4cb0c15

Please sign in to comment.