forked from mcvine/mcvine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (48 loc) · 1.74 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
sudo: true
# dist: trusty
language: python
python:
- 2.7
- 3.6
- 3.8
# branches:
# only:
# - master
# services:
#
# matrix:
# include:
# - env: NUMPY_VERSION=1.16.0
before_install:
- if [[ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-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
install:
- export GIT_FULL_HASH=`git rev-parse HEAD`
- export GIT_VER=`git describe --tags`
- export VERSION=`git describe --tags | cut -d '-' -f1 | cut -c2-`
- export VERSION_NEXT=`echo ${VERSION}| awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}'`
- echo ${VERSION} ${VERSION_NEXT}
- export MCVINE_CONDA_PKG_VER=${VERSION_NEXT}.dev
- echo ${TRAVIS_PYTHON_VERSION}
- conda config --set always_yes true
- conda install conda
- conda config --add channels conda-forge
- conda config --add channels diffpy
- conda config --add channels mcvine
- conda install -n root conda-build
- ./builders/travis-conda/run-travis-build.sh
- conda install anaconda-client
- conda config --set anaconda_upload no
- anaconda -t $CONDA_UPLOAD_TOKEN upload --force /home/travis/mc/conda-bld/linux-64/mcvine-core-$MCVINE_CONDA_PKG_VER-*.tar.bz2 --label unstable
script:
- echo "mcvine"
after_failure:
# dump the last 3000 lines of error log (including warnings).
# see build.sh in builders/travis-conda
- tail --lines=3000 $ERRLOG
notifications:
email:
on_success: change
on_failure: always