-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
74 lines (62 loc) · 2.88 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
language: python
matrix:
# This will launch a separate build for each Python version you add
# Feel free to add extra environment variables as needed
include:
# - python: 3.5
- python: 3.6
before_install:
# Install the latest version of Miniconda
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda # Update CONDA without command line prompt
# Useful for debugging any issues with conda
- conda info -a
- conda config --add channels conda-forge
- conda config --add channels observingclouds
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file dev-requirements.txt
# - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION eurec4a_snd --file dev-requirements.txt
- source activate test-environment
#pip install -r dev-requirements.txt
install:
# - python setup.py install
- python setup.py build
#- conda install -q conda-build # --yes?
# You can add any CONDA channels you may need here. CONDA supports
# both the commands add and append. The only difference is that
# the add command places the channel at the front of the priority
# list, while append does the opposite.
#- conda config --add channels conda-forge
# Build the conda recipe for this package
#- conda build -q conda-recipe --python=$TRAVIS_PYTHON_VERSION --output-folder bld-dir
# Add the built package as a channel with highest priority
#- conda config --add channels "file://`pwd`/bld-dir"
# Create and activate the test environment
#- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION eurec4a_snd --file dev-requirements.txt
#- source activate test-environment
script: true
after_success:
# Conda deploy if on tag
# ANACONDA_TOKEN should be provided by Travis
# How to generate ANACONDA_TOKEN: https://docs.anaconda.com/anaconda-cloud/user-guide/tasks/work-with-accounts#creating-access-tokens
# https://conda.io/docs/user-guide/tasks/build-packages/install-conda-build.html
- conda install -y conda-build conda-verify anaconda-client
- conda config --set anaconda_upload no
- travis_wait 60 conda build --quiet --no-test --output-folder conda_build conda_recipe
# Convert to other platforms: OSX, WIN
- conda convert --platform win-64 conda_build/linux-64/*.tar.bz2 -o conda_build/
- conda convert --platform osx-64 conda_build/linux-64/*.tar.bz2 -o conda_build/
# Upload to Anaconda
# We could use --all but too much platforms to uploaded
- ls conda_build/*/*.tar.bz2 | xargs -I {} anaconda -v -t $CONDA_UPLOAD_TOKEN upload --force {}
deploy:
provider: pypi
user: $PYPI_USER
password: $PYPI_PASSWORD
skip_existing: true
distributions: "sdist bdist_wheel"
on:
tags: true