-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
55 lines (46 loc) · 3.6 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
# 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.
language: python
sudo: false
env:
global:
- CONDA_INSTALL_LOCN="${HOME}/conda"
# Secure BINSTAR_TOKEN for scitools/conda-build-all which can write to Obvious-CI-tests
- secure: Jdnn46HEYC+3FdsK4HK4SBJhV6lFKhgD/ei1Tf5pgYXOs7Vw5kpKHdmRjyNjUCWk7Lbjuud5ILWZSV6+1Zn/kHCqIT4UDMbF/GtXRIaQYEf1P7R2WTw+OghcSM90RNBi1Aj996LHGRvCDR/VRArNyiTN8kjUsdp8mUyxuP1JM3duAdBd0SmWugVLUTKvb9sOzifO90kzBUtqeiHG4t6/8m3052pUWUiSxWJ10KVomuV0BsBvgcGajWOHvovHjqE+kTCpTxZaeTJL77ewN1ICtN2ytK5ZtnITwJbZiQ/MRybsZkQ6C+AEa8YwZZYoruGGome3KAgCuj+DVsx0klAfu4fVcAjGyMEYXsye1/Gu+2dXq2xkfLrz56cMYK3jG+pxMrUiRomXhrrUhvzqsDcnTHLDhJYixhAt8/T8IiiunENrapOP0jdE8Z+MS2hiPZNlnMbpQRac2XnQ+qHBn+618/s83eEtl3UA1YGd8AkaQtvaASoMwjBU5PBYScQrA0RPEdxgcX/eFnRFCFgZkioB5jo25rKuxmd5xufAQQzdc1ke3Bh4bp8pgB59s6paz6ucXSy06pBt1vVqXGHpEPkWx+6LIpk15PwwkDXhpeLNmAc4p+JBTATz3Rlhc70CAapt05P7bDTbCmGukDviSIrg5I7aWU81j4js48mxfRpXK1U=
# Secure BINSTAR_TOKEN for pelson/conda-build-all which can write to Obvious-CI-tests
- secure: Dz1ZWH583kXz725IUSU32en048qGnweQZqrONg9CmDZuBwb3hE6CZ/qpXlKxLD6pqrV1fRJLxhoJo+7wS828GVdg5nfGdw1TyJdSsIDVjXjVMKRGx4fJagodE83E1sjBgyFrh7z/giHmT65+mExS4lzGBM56fOoVrNk2+WTF31xsPAMimF1qLvNA9vBpOExjpxaugFaZwRdhWqYMHT2RtLUnFPjtOWvj0Q0MlLUjoXznTRTl6YLN2jyRbEg42R62goXgp6hAVQ7Dn/OfV4ax8pofiStwmMSFdyfx3Y60xEGAwopO5DzYNVqwO4t2lvoIq9jkQH3RQCtNjEZ8KcewuLym+RapRcidAwUwhaW3K7IDqbiSmaD5x6wgwZripfl+LHcWgXup0gK/eYVwrVh3hsa6ATwpc7/qMMSR1AEhHooUv6bNzASSeZmiBh/2gvq7Kob+WAa+RgwdCc1wOGsmWdicvLWSTwvnriHDrUYqS/uixV5A7C+o8VsnQC2Lcx24pO50NBhSSBpp73yHNmaQIwwEmxDEBUiFqtYz/V0peck+UQMHi+sgR/V8xB2dVQiyxaZI3/UAGtBqf3qtOGRiLQ3kFW8DAbi/2t19xk8c0FLf17ELTxURiFjTPQ78qmDDaI6MmK2bhi9IjTFBLLJU4m2ziW2l0MrTm4w3dwU7kls=
matrix:
- PYTHON=2.7
- PYTHON=3.4
# test against older conda-build
- PYTHON=3.5
EXTRA_DEPS='conda-build=2.0.*'
- PYTHON=3.5
CONDA_BUILD_ALL_TEST_ANACONDA_CLOUD=1
- PYTHON=3.5
CONDA_ORIGIN=https://repo.continuum.io/pkgs/main
install:
- mkdir -p ${HOME}/cache/pkgs
- "[ ! -f ${HOME}/cache/miniconda.sh ] && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ${HOME}/cache/miniconda.sh || :"
- bash ${HOME}/cache/miniconda.sh -b -p ${CONDA_INSTALL_LOCN} && export PATH=${CONDA_INSTALL_LOCN}/bin:$PATH
# Re-use the pacakges in the cache, and download any new ones into that location.
- rm -rf ${CONDA_INSTALL_LOCN}/pkgs && ln -s ${HOME}/cache/pkgs ${CONDA_INSTALL_LOCN}/pkgs
# Disable integration (not unit) testing if there is no BINSTAR_TOKEN defined.
- if [ -z "$BINSTAR_TOKEN" -a -n "$CONDA_BUILD_ALL_TEST_ANACONDA_CLOUD" ]; then
echo "BINSTAR_TOKEN is not defined, some of the intergation tests have been disabled. These will be re-enabled when merged." &&
export CONDA_BUILD_ALL_TEST_ANACONDA_CLOUD=0;
fi
# Now do the things we need to do to install it.
- conda install -c conda-forge --file requirements.txt nose mock python=${PYTHON} ${EXTRA_DEPS} --yes --quiet
- if [[ -n ${CONDA_ORIGIN} ]]; then conda install -yq -c ${CONDA_ORIGIN} conda conda-build; fi
- python setup.py install
- mkdir not_the_source_root && cd not_the_source_root
script:
- nosetests conda_build_all
# We store the files that are downloaded from continuum.io, but not the environments that are created.
cache:
directories:
- $HOME/cache
before_cache:
# Remove all untarred directories.
- find $CONDA_INSTALL_LOCN/pkgs/ -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;