forked from soft-matter/pims
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
72 lines (66 loc) · 2.8 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
language: python
sudo: false
matrix:
include:
- python: "2.7"
env: DEPS="numpy=1.8* slicerator tifffile" BUILD_DOCS=false
- python: "2.7"
env: DEPS="numpy slicerator scipy pillow matplotlib scikit-image jinja2 av libtiff tifffile jpype1" DEPSPIP="moviepy imageio" BUILD_DOCS=false
- python: "3.6"
env: DEPS="numpy slicerator tifffile" BUILD_DOCS=false
- python: "3.6"
env: DEPS="numpy slicerator scipy pillow matplotlib scikit-image jinja2 av tifffile libtiff jpype1 ipython sphinx sphinx_rtd_theme numpydoc" DEPSPIP="moviepy imageio" BUILD_DOCS=true
install:
- conda update --yes conda
# Append the conda-forge channel, instead of adding it. See:
# https://github.com/conda-forge/conda-forge.github.io/issues/232)
- conda config --append channels conda-forge
- conda create -n testenv --yes $DEPS nose python=$TRAVIS_PYTHON_VERSION
- source activate testenv
# only install pip if there are pip dependencies
- |
if [ -n "$DEPSPIP" ]; then
conda install -n testenv --yes pip
pip install $DEPSPIP
fi
- python setup.py build_ext install
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ];
then
wget http://repo.continuum.io/miniconda/Miniconda-3.7.3-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-3.7.3-Linux-x86_64.sh -O miniconda.sh;
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p /home/travis/mc
- export PATH=/home/travis/mc/bin:$PATH
script:
- nosetests --nologcapture
# Doc Build needs: pillow matplotlib ipython sphinx sphinx_rtd_theme numpydoc
- if [ $BUILD_DOCS == true ]; then make html --directory=./doc; fi
after_success:
- cd $TRAVIS_BUILD_DIR
- |
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'soft-matter/pims' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
echo "Uploading documentation"
openssl aes-256-cbc -K $encrypted_63b17445501f_key -iv $encrypted_63b17445501f_iv -in soft-matter-docs-deploy.enc -out soft-matter-docs-deploy -d
eval `ssh-agent -s`
chmod 600 soft-matter-docs-deploy
ssh-add soft-matter-docs-deploy
git config --global user.email "Travis@nomail"
git config --global user.name "Travis"
git config --global push.default simple
git clone [email protected]:soft-matter/soft-matter.github.io.git ./doc-repo
cd doc-repo/pims
git checkout --orphan temp_branch
git rm -rf ./dev
mv $TRAVIS_BUILD_DIR/doc/build/html ./dev
if [ -n "$TRAVIS_TAG" ]; then
cp -R dev $TRAVIS_TAG;
fi
git add -A
git commit -m "Docs build of pims commit $TRAVIS_COMMIT"
git branch -D master
git branch -m master
git push --set-upstream origin master --force
fi