forked from AIM-Harvard/pyradiomics
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
88 lines (75 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
81
82
83
84
85
86
87
88
# Config file for automatic testing at travis-ci.org
language: python
matrix:
include:
- os: osx
language: generic
env:
- PYTHON_VERSION=3.5.5
- PYTHON_SHORT_VERSION=3.5
- os: osx
language: generic
env:
- PYTHON_VERSION=3.6.5
- PYTHON_SHORT_VERSION=3.6
- os: osx
language: generic
env:
- PYTHON_VERSION=3.7.8
- PYTHON_SHORT_VERSION=3.7
before_cache:
# Cleanup to avoid the cache to grow indefinitely as new package versions are released
# see https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
- brew cleanup
cache:
directories:
# Cache downloaded bottles
- $HOME/Library/Caches/Homebrew
# pyenv
- $HOME/.pyenv_cache
- $HOME/.pyenv/versions/3.7.8
- $HOME/.pyenv/versions/3.6.5
- $HOME/.pyenv/versions/3.5.5
# scikit-ci-addons
- $HOME/downloads
before_install:
# Workaround the following error occuring because python installation is cached but gettext dependency is not
# dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
# Referenced from: /Users/travis/.pyenv/versions/3.7.2/bin/python
# Reason: Incompatible library version: python requires version 11.0.0 or later, but libintl.8.dylib provides version 10.0.0
# See https://github.com/scikit-build/cmake-python-distributions/issues/112 and
# https://github.com/scikit-build/cmake-python-distributions/pull/113
- brew update
- brew install gettext
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; fi
- pip install scikit-ci scikit-ci-addons
- ci_addons --install ../addons
install:
- ci install
script:
- ci test
after_success:
- ci after_test
before_deploy:
- sudo pip install twine # Twine installation requires sudo to get access to /usr/local/man
deploy:
- provider: script
skip_cleanup: true
script: twine upload dist/*.whl -u $PYPI_USER -p $PYPI_PASSWORD
on:
tags: true
condition: $TRAVIS_TAG =~ ^v?[0-9]+(\.[0-9]+)*(rc[0-9]+)?$ && $TRAVIS_REPO_SLUG == Radiomics/pyradiomics
- provider: script
script:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
hash -r;
export PATH=$HOME/miniconda/bin:$PATH;
conda config --set always_yes yes;
conda install gcc libgcc;
bash ./conda/configure_conda.sh;
conda build ./conda --python=$PYTHON_SHORT_VERSION --croot $HOME/conda-bld;
anaconda -t $ANACONDA_TOKEN upload -u Radiomics $HOME/conda-bld/osx-64/pyradiomics-*.tar.bz2 --force
on:
tags: true
condition: $TRAVIS_TAG =~ ^v?[0-9]+(\.[0-9]+)*(rc[0-9]+)?$ && $TRAVIS_REPO_SLUG == Radiomics/pyradiomics