-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
35 lines (35 loc) · 1.2 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
language: generic
sudo: required
os:
- linux
env:
matrix:
- CONDA_PY=36
install:
- |
echo "Installing a fresh version of Miniconda."
MINICONDA_URL="https://repo.continuum.io/miniconda"
MINICONDA_FILE="Miniconda3-latest-$(case $TRAVIS_OS_NAME in (linux) echo Linux;; (osx) echo MacOSX;;esac)-x86_64.sh"
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}"
bash $MINICONDA_FILE -b
- |
echo "Configuring conda."
source $HOME/miniconda3/bin/activate root
conda install -y conda-build anaconda-client flake8
script:
- |
flake8 .
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
conda build -c intake -c defaults -c conda-forge ./conda
else
# Workaround for Travis-CI bug #2: https://github.com/travis-ci/travis-ci/issues/7773
conda build -c intake -c defaults -c conda-forge --no-test ./conda
fi
- |
if [ -n "$TRAVIS_TAG" ]; then
# If tagged git version, upload package to main channel
anaconda -t ${ANACONDA_TOKEN} upload -u informaticslab --force `conda build --output ./conda`
elif ! [ -n "$TRAVIS_PULL_REQUEST" ]; then
# Otherwise upload package to dev channel
anaconda -t ${ANACONDA_TOKEN} upload -u informaticslab --label dev --force `conda build --output ./conda`
fi