-
Notifications
You must be signed in to change notification settings - Fork 105
/
.travis.yml
62 lines (59 loc) · 2.33 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
language: python
sudo: required
dist: trusty
services:
- docker
notifications:
email: false
matrix:
include:
- python: 2.7
#env: DOCKER_TAG=linux-python27
- python: 3.5
#env: DOCKER_TAG=linux-python35
- python: 3.6
env: DEPLOY_ENC_LABEL=e64cfe3b4e81
- language: generic
os: osx
env: TRAVIS_PYTHON_VERSION=2.7
- language: generic
os: osx
env: TRAVIS_PYTHON_VERSION=3.5
- language: generic
os: osx
env: TRAVIS_PYTHON_VERSION=3.6
# Setup anaconda
before_install:
- set -e # Exit immediately if a command exits with a non-zero status
- |
if [ -z "$DOCKER_TAG" ]; then
./ci/travis_legacy_deps.sh
else
export DOCKER_USER=richardotis
docker run --cidfile /tmp/build.cid -v $(pwd):/pycalphad:rw -it $DOCKER_USER/pycalphad-base:$DOCKER_TAG /bin/bash -c "cd /pycalphad ; source /work/miniconda/envs/condaenv/bin/activate condaenv ; conda develop . ; pip install coveralls nose-cov; python setup.py build_ext --inplace ; python setup.py install ; python -c 'import pycalphad ; print(pycalphad.__version__)' ; cd /work"
docker commit `cat /tmp/build.cid` $DOCKER_USER/pycalphad:$DOCKER_TAG
fi
# Install packages
install:
- |
if [ -z "$DOCKER_TAG" ]; then
source $HOME/miniconda2/bin/activate condaenv
conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib nose pandas sympy pyparsing dask dill
conda install --yes xarray gcc cython cyipopt
# install (for py34) and remove gmpy2 for Mac builds
conda install --yes gmpy2
conda remove --force gmpy2 --yes
pip install -e .
fi
# Run test
script:
- |
if [ -z "$DOCKER_TAG" ]; then
pip install sphinx sphinx_rtd_theme coveralls ipython
nosetests --with-coverage
bash ci/deploy.sh
coveralls
else
env -u PATH -u PYTHONPATH -u LANG -u PWD -u HOME -u TRAVIS_COMMIT_MESSAGE > ./env.list
docker run --rm --env-file ./env.list -v $(pwd):/pycalphad:rw -it $DOCKER_USER/pycalphad:$DOCKER_TAG /bin/bash -c "cd /pycalphad ; source /work/miniconda/envs/condaenv/bin/activate condaenv && nosetests --with-coverage && pip install sphinx sphinx_rtd_theme coveralls ipython && bash ci/deploy.sh && coveralls"
fi