forked from vpython/vpython-jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
115 lines (103 loc) · 6.14 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# The language in this case has no bearing - we are going to be making use of "conda" for a
# python distribution for the scientific python stack.
os:
- linux
- osx
env:
global:
- TARGET_ARCH="x64"
# BINSTAR_TOKEN
- secure: "LDYzSjtNbN7dZJzfxz1FX0Mk4DzzyM+3UQ3QqUIAvcyRKlUru9Diq6/xDkzf5SI/ucQ+aIlOdOXj/xjdSZOCDWKK3wvh1/0MQPVjnvoCo4CN+80v8c6zCLGmUMdPJ2Tk3lhGGpLTLF7yKQKQN62TTuo9Ij1/PhFjJ8vrJoIAFwdcZVFZlHEpLay2A26G7Jg+ViMli2aQ9LvhKpgrTxQRXzGPM2jOnkhP04g7/Mmp0Wo875GVx3+/mAZNE8RxqZc9M/dHmNGltiGqKuv5iB4yLAAGEK6DwX8i1Hapj9pJJC4+MSgDitX041V5AFo18nIz3BrqwDkvqMuqUNXYaJM3FaMxRSPey8AgZHPCDCqKDniKyxRH4rh2ljU9y65blUvQGva4TEbCYnlS/uS9Net6OaHIkNiVTaDIy9DrotXxlffNQh6667z3bGGXyh/jaNSfoxC8D0++VRYn6gQcYInOrbktm3VXVm0kZZO6d+Y9y0qLCYXifRY3BppJEOSWn2OVII7TrgrI+Vzpfy37QajhIjjt35MFuxGefIwkMe+SPKntrGU/QPd1dZ6mdVk6Ef3XuWX5I/JqRCGWuc7Cw480igzl9OUtX7T5VY9IkuSQldOUHbC8Pbf1apxSzj2LCqK6Nsn6noZ6QPgMd7hOH2f9BEjxu/vlFTVz98RiS4kNWmk="
# TWINE_PASSWORD
- secure: "WihSFAWiTp1/vx1W/Dx1mZb2QCJUtyFWCtT+EsW7syKVq0nfP8YezUp32WnQaMNUqjE2hNDmSDHRGforsNziCuowXMj5QZxjlAP+4dcSsPTZRR5q9FYd6oUXF8px3HEmD7oT5w0bNeKK6Y7zdBitUKoHO5ITd+ciNajqRBPl8bHkfe3ybxKuZyDK9eGmsS7C8qEcGwh8GQZ871QyfqJ4LHpLec5ZAD1GnP4y+BxOoKvwPXBA1xIeqsIU1WReXtM/hieyul3oCSrNi04gMpZXYHRRC3vZpYKTalW5yq1kg2UseFp2YBjjHJk7uXoiRvtXRBHjaUuHsVMF6oFBqRZKMdy4QaAKkOVKhrKDLEbgPzzwpjP25W3LLISDEi0WpjuCx0k602/XXEPZ9oPQ0nmCFcCeRJ5dyNqeLhLEzz0q2eMHJuYkB0aA1GUEMqcnnCGmElZe/oytn26FA1GBOFXwp35vrvOQyD3kndP2jqMmjI6Yzv0TGKJHTfhv9z+pFhezBlTfrH8mKuydSbIHA2QKPP1AwcoFfvhZIWmwb1F6BLVLSqx+d5+ndHMSsncG/DX1Gzmvlx5pmbMbLeXDocziuXC2wmnc3ma1qOV26s6rrnlv2BLhEaltsxxPXiGvwmNEMV7FcwymIkcxDXDgevnyKp9tc+/iLchP0odYbEwDATk="
- CONDA_INSTALL_LOCN="${HOME}/miniconda"
- TWINE_USERNAME="mwcraig"
matrix:
- CONDA_PY=3.6
- CONDA_PY=3.7
install:
# Install and set up miniconda.
- if [ $TRAVIS_OS_NAME == "linux" ]; then wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- if [ $TRAVIS_OS_NAME == "osx" ]; then wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
- bash miniconda.sh -b -p $CONDA_INSTALL_LOCN
- export PATH=${CONDA_INSTALL_LOCN}/bin:$PATH
- conda config --set always_yes true
# Gets us vpnotebook
- conda config --add channels vpython
- conda update --quiet conda
# Install a couple of dependencies we need for sure.
# Not sure why cython is necessary since it is listed as a build dependency.
- conda install --quiet jinja2 conda-build anaconda-client cython twine pytest
# make a wheel building environment to ensure correct python version.
- conda create --quiet -n wheel-build python=$CONDA_PY wheel cython
# For debugging....
- conda info -a
script:
# Define a variable that will be YES for exactly one os/python
# combination and use it to decide whether to upload an sdist.
# This should prevent spurious failures at the deploy stage.
- export UPLOAD_SDIST="NO"
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ "$CONDA_PY" == "3.7" ]; then
export UPLOAD_SDIST="YES";
fi
fi
- echo $UPLOAD_SDIST
# Run tests
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
python setup.py install;
py.test vpython;
twine check dist/*;
fi
# Not much of a real test yet, just try to build myself...
- conda build --quiet vpython.recipe
- export CONDA_PACKAGE=`conda build --output vpython.recipe | grep bz2`
- export OUTPUT_DIR=`dirname $CONDA_PACKAGE`
# Uncomment the next line when bdist_wheel option in recipe starts
# paying attention to CONDA_PY. See:
# https://github.com/conda/conda-build/issues/1832
# - export WHEEL_PACKAGE="$OUTPUT_DIR/*.whl"
- source activate wheel-build; python setup.py bdist_wheel; source deactivate
- export WHEEL_PACKAGE=dist/*.whl
- echo $CONDA_PACKAGE
- echo $WHEEL_PACKAGE
# This will fail if the package does not actually exist
- ls $CONDA_PACKAGE $WHEEL_PACKAGE
- if [ $TRAVIS_EVENT_TYPE == "cron" ]; then
conda install -c astropy -c conda-forge extruder twine;
copy_packages vp_copy.yaml vpython;
fi
after_success:
- echo $TRAVIS_TAG
- git branch --contains $TRAVIS_TAG
- upload_label=$(python .ci-support/upload_label.py)
- if [[ "$TRAVIS_TAG" ]]; then upload_build="true"; else upload_build=; fi
- echo $upload_build
- echo "Uploading to $upload_label"
# If this build is because of a tag, upload the build if it succeeds.
- if [ -n "$upload_build" ]; then anaconda -t $BINSTAR_TOKEN upload -u vpython -l $upload_label $CONDA_PACKAGE; fi
# Upload wheel builds to pypi instead of relying on travis deploy because that
# does not seem to continue gracefully if a distribution already exists,
# and in most of the jobs a source distribution will already have been
# uploaded to PyPI.
#
# sdist is still uploaded with travis deploy.
#
# The twine password has been set in $TWINE_PASSWORD.
- if [ -n "$upload_build" ]; then twine upload $WHEEL_PACKAGE; fi
# In any event, remove the built wheel because having it around appears to
# confuse the deploy step, which is still trying to upload a wheel.
- rm -f $WHEEL_PACKAGE
deploy:
provider: pypi
user: mwcraig
password:
# TWINE_PASSWORD
- secure: "WihSFAWiTp1/vx1W/Dx1mZb2QCJUtyFWCtT+EsW7syKVq0nfP8YezUp32WnQaMNUqjE2hNDmSDHRGforsNziCuowXMj5QZxjlAP+4dcSsPTZRR5q9FYd6oUXF8px3HEmD7oT5w0bNeKK6Y7zdBitUKoHO5ITd+ciNajqRBPl8bHkfe3ybxKuZyDK9eGmsS7C8qEcGwh8GQZ871QyfqJ4LHpLec5ZAD1GnP4y+BxOoKvwPXBA1xIeqsIU1WReXtM/hieyul3oCSrNi04gMpZXYHRRC3vZpYKTalW5yq1kg2UseFp2YBjjHJk7uXoiRvtXRBHjaUuHsVMF6oFBqRZKMdy4QaAKkOVKhrKDLEbgPzzwpjP25W3LLISDEi0WpjuCx0k602/XXEPZ9oPQ0nmCFcCeRJ5dyNqeLhLEzz0q2eMHJuYkB0aA1GUEMqcnnCGmElZe/oytn26FA1GBOFXwp35vrvOQyD3kndP2jqMmjI6Yzv0TGKJHTfhv9z+pFhezBlTfrH8mKuydSbIHA2QKPP1AwcoFfvhZIWmwb1F6BLVLSqx+d5+ndHMSsncG/DX1Gzmvlx5pmbMbLeXDocziuXC2wmnc3ma1qOV26s6rrnlv2BLhEaltsxxPXiGvwmNEMV7FcwymIkcxDXDgevnyKp9tc+/iLchP0odYbEwDATk="
upload_docs: no
skip_cleanup: true
on:
tags: true
distributions: "sdist"
repo: vpython/vpython-jupyter
condition: $UPLOAD_SDIST = "YES"