-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update copyright * use sphinxext instead of manually .nojekyll * DOC: circleci now builds DEV docs * make use of filepath_prefix for binder * go from ~= pip syntax to >=X,<Y * remove prior docbuild command * use circleci ssh key * add links to prior doc versions * fix indentation circleci * fix circle run step * re-add missing line, remove tmp line * fix LATEST link in README + WHATS NEW [skip ci] * do not constrain mne version in master
- Loading branch information
1 parent
338e771
commit 7ccee73
Showing
7 changed files
with
129 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,106 @@ | ||
version: 2 | ||
# See: https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/ | ||
version: 2.1 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/python:3.7.3-stretch | ||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Check environment.yml and doc/environment.yml syncing | ||
# doc/environment.yml must be a perfect copy of environment.yml | ||
# with a single line " - mne_bids~=0.X" added in the pip section | ||
command: diff <(grep -v '^ - mne_bids~=0.3$' doc/environment.yml) <(cat environment.yml) | ||
|
||
# restore cache from last build. Unless __init__.py has changed since then | ||
- restore_cache: | ||
keys: | ||
- data-cache-0-{{ checksum "./mne_bids/__init__.py" }} | ||
|
||
# Also restore pip cache to speed up installations | ||
- restore_cache: | ||
keys: | ||
- pip-cache-0-{{ checksum "./environment.yml" }} | ||
|
||
- run: | ||
name: Install miniconda | ||
command: | | ||
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh; | ||
chmod +x ~/miniconda.sh; | ||
~/miniconda.sh -b -p ~/miniconda; | ||
echo "export PATH=~/miniconda/bin:$PATH" >> $BASH_ENV; | ||
- run: | ||
name: Setup Python environment | ||
# ... but use latest version of MNE | ||
command: | | ||
conda update --yes --quiet conda | ||
conda env create -f environment.yml --name=testenv | ||
source activate testenv | ||
pip install -U https://api.github.com/repos/mne-tools/mne-python/zipball/master | ||
python setup.py develop | ||
- run: | ||
name: Build the documentation | ||
command: | | ||
source activate testenv | ||
make build-doc | ||
- store_artifacts: | ||
path: doc/_build/html/ | ||
destination: html | ||
|
||
# Store the data cache | ||
- save_cache: | ||
key: data-cache-0-{{ checksum "./mne_bids/__init__.py" }} | ||
paths: | ||
- ~/mne_data | ||
|
||
# Store pip cache | ||
- save_cache: | ||
key: pip-cache-0-{{ checksum "./environment.yml" }} | ||
paths: | ||
- ~/.cache/pip | ||
|
||
- add_ssh_keys: | ||
fingerprints: | ||
- "bf:ac:92:1d:dc:ca:a0:2d:aa:f6:b2:b6:d5:1c:ac:74" | ||
|
||
- deploy: | ||
name: github pages deployment | ||
command: | | ||
source activate testenv | ||
if [ "${CIRCLE_BRANCH}" == "maint/0.3" ]; then | ||
echo "Deploying stable docs for ${CIRCLE_BRANCH}."; | ||
git config --global user.email "[email protected]"; | ||
git config --global user.name "Circle Ci"; | ||
cd doc; | ||
make install; | ||
else | ||
echo "No deployment (build: ${CIRCLE_BRANCH})."; | ||
fi | ||
docs-build: | ||
docker: | ||
- image: circleci/python:3.7.3-stretch | ||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Check environment.yml and doc/environment.yml syncing | ||
# doc/environment.yml must be a perfect copy of environment.yml | ||
# with a single line " - mne_bids>=0.X,<0.Y" added in the pip section | ||
command: diff <(grep -v '^ - mne_bids>=0.*,<0.*$' doc/environment.yml) <(cat environment.yml) | ||
|
||
# restore cache from last build. Unless __init__.py has changed since then | ||
- restore_cache: | ||
keys: | ||
- data-cache-0-{{ checksum "./mne_bids/__init__.py" }} | ||
|
||
# Also restore pip cache to speed up installations | ||
- restore_cache: | ||
keys: | ||
- pip-cache-0-{{ checksum "./environment.yml" }} | ||
|
||
- run: | ||
name: Install miniconda | ||
command: | | ||
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh; | ||
chmod +x ~/miniconda.sh; | ||
~/miniconda.sh -b -p ~/miniconda; | ||
echo "export PATH=~/miniconda/bin:$PATH" >> $BASH_ENV; | ||
- run: | ||
name: Setup Python environment | ||
# ... but use latest version of MNE | ||
command: | | ||
conda update --yes --quiet conda | ||
conda env create -f environment.yml --name=testenv | ||
source activate testenv | ||
pip install -U https://api.github.com/repos/mne-tools/mne-python/zipball/master | ||
python setup.py develop | ||
- run: | ||
name: Build the documentation | ||
command: | | ||
source activate testenv | ||
make build-doc | ||
- persist_to_workspace: | ||
root: doc/_build | ||
paths: html | ||
|
||
- store_artifacts: | ||
path: doc/_build/html/ | ||
destination: html | ||
|
||
# Store the data cache | ||
- save_cache: | ||
key: data-cache-0-{{ checksum "./mne_bids/__init__.py" }} | ||
paths: | ||
- ~/mne_data | ||
|
||
# Store pip cache | ||
- save_cache: | ||
key: pip-cache-0-{{ checksum "./environment.yml" }} | ||
paths: | ||
- ~/.cache/pip | ||
|
||
docs-deploy: | ||
# will only be run on master branch | ||
docker: | ||
- image: node:8.10.0 | ||
steps: | ||
- checkout | ||
|
||
- attach_workspace: | ||
at: doc/_build | ||
|
||
- run: | ||
name: Install and configure dependencies | ||
command: | | ||
npm install -g --silent [email protected] | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Circle Ci" | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "7f:74:00:17:2b:1a:7d:68:56:68:6b:64:b5:e0:7f:91" | ||
|
||
- run: | ||
# push built docs into the `dev` directory on the `gh-pages` branch | ||
name: Deploy docs to gh-pages branch | ||
command: gh-pages --dotfiles --message "doc updates [skip ci]" --dist doc/_build/html --dest ./dev | ||
|
||
workflows: | ||
build: | ||
jobs: | ||
- docs-build | ||
- docs-deploy: | ||
requires: | ||
- docs-build | ||
filters: | ||
branches: | ||
only: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters