forked from paulscherrerinstitute/pcaspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
80 lines (74 loc) · 2.76 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
sudo: required
services:
- docker
language: cpp
matrix:
include:
- os: linux
dist: trusty
env: CONDA_PY=2.7
- os: linux
dist: trusty
env: CONDA_PY=3.5
- os: linux
dist: trusty
env: CONDA_PY=3.6
- os: osx
env: CONDA_PY=2.7
- os: osx
env: CONDA_PY=3.5
- os: osx
env: CONDA_PY=3.6
install:
# Set the anaconda environment
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$CONDA_PY" == "2.7" ]]; then
curl https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -o miniconda.sh;
else
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh;
fi;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda update -q --all;
conda config --add channels defaults;
conda config --add channels ${CONDA_CHANNEL};
conda install conda-build=2 pip anaconda-client;
else
curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
conda config --set always_yes yes --set changeps1 no;
conda config --add channels defaults;
conda install pip anaconda-client;
docker pull continuumio/anaconda-build-linux-64:latest;
mkdir -m 0777 -p $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64;
fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
conda build conda-recipe;
else
./conda_build_in_docker.sh `pwd` $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64 ${CONDA_CHANNEL};
fi
after_success:
- ls $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64
- if [[ ! -z "$TRAVIS_TAG" ]]; then
anaconda -t $CONDA_TOKEN upload --force $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/*.tar.bz2;
echo [distutils] > ~/.pypirc;
echo index-servers = mypypi >> ~/.pypirc;
echo [mypypi] >> ~/.pypirc;
echo repository=$PYPI_URL >> ~/.pypirc;
echo username=$PYPI_USER >> ~/.pypirc;
echo password=$PYPI_PASSWORD >> ~/.pypirc;
pip install twine;
if [[ $TRAVIS_OS_NAME == "linux" && $CONDA_PY == "2.7" ]]; then
twine upload -r mypypi $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/pcaspy-*.tar.gz;
fi;
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
twine upload -r mypypi $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/pcaspy-*.egg;
fi;
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
twine upload -r mypypi $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/pcaspy-*.whl;
fi;
fi