forked from paulscherrerinstitute/pcaspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (54 loc) · 2.37 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
sudo: required
services:
- docker
language: cpp
matrix:
include:
- os: linux
env: MY_CONDA_VERSION=latest
- os: osx
env:
- MY_CONDA_VERSION=latest
- CONDA_BUILD_SYSROOT="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
install:
# Set the anaconda environment
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl https://repo.anaconda.com/miniconda/Miniconda3-${MY_CONDA_VERSION}-MacOSX-x86_64.sh -o miniconda.sh;
else
curl https://repo.anaconda.com/miniconda/Miniconda3-${MY_CONDA_VERSION}-Linux-x86_64.sh -o miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- source $HOME/miniconda/bin/activate
- conda config --set always_yes yes --set changeps1 no
- conda update -q --all
- conda config --add channels defaults
- conda install conda-build pip anaconda-client
- conda info
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
[[ -e /opt/MacOSX10.9.sdk ]] || sudo ln -s ${CONDA_BUILD_SYSROOT} /opt/MacOSX10.9.sdk;
printf "CONDA_BUILD_SYSROOT:\n - ${CONDA_BUILD_SYSROOT}\n" >> conda-recipe/conda_build_config.yaml;
conda build -c ${MY_CONDA_CHANNEL} conda-recipe;
else
mkdir -m 0777 -p $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64;
./conda_build_in_docker.sh `pwd` $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64 ${MY_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" ]]; then
twine upload -r mypypi --skip-existing $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/pcaspy-*.tar.gz;
twine upload -r mypypi --skip-existing $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/pcaspy-*.egg;
fi;
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
twine upload -r mypypi --skip-existing $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64/pcaspy-*.whl;
fi;
fi