-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
98 lines (86 loc) · 3.33 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
89
90
91
92
93
94
95
96
97
98
language: python
# To automatically push to anaconda cloud tag a relase in the git repository
# git tag -a v0.2.3 -m 'Version with working conda installer'
# git push --tags
jobs:
include:
- name: "linux"
os: linux
language: python
python: 3.7 # this works for Linux but is ignored on macOS or Windows
before_install:
# To make sure travis can read the GIT_DESCRIBE_TAG properly we need to force an unshallow fetch
- git fetch --unshallow
# 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
- pwd
- export PATH=/home/travis/miniconda3/bin:$PATH
- conda update --yes conda # Update CONDA without command line prompt
env:
- CC=gcc-5
- CXX=g++-5
- name: "osx"
os: osx
language: sh
before_cache:
- brew cleanup
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
addons:
homebrew:
packages: python3
before_install:
# To make sure travis can read the GIT_DESCRIBE_TAG properly we need to force an unshallow fetch
- git fetch --unshallow
# Install the latest version of Miniconda
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- pwd
- export PATH=/Users/travis/miniconda3/bin:$PATH
- conda update --yes conda # Update CONDA without command line prompt
env:
- CC=clang
- CXX=clang++
install:
# Create a new environment
- conda create --yes --name test python=$TRAVIS_PYTHON_VERSION
# Activate it
- source activate test
# Install various dependencies
- conda install --yes numpy=1.17 pytest pip
install:
- conda install --yes conda-build
# 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 pytorch
- conda config --add channels conda-forge
- conda config --add channels anaconda
- conda config --add channels uncbiag
# Build the conda recipe for this package
- conda build . --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 --yes --name test-environment python=$TRAVIS_PYTHON_VERSION mermaid --file dev-requirements.txt
- source activate test-environment
# command to install dependencies
#install:
# - python setup.py install
# command to run tests
script: ./travis_test.sh
after_success:
# Install the command line API for CONDA uploads
- conda install --yes anaconda-client
- |
## Only upload builds from tags
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == "uncbiag/mermaid" && $TRAVIS_BRANCH == $TRAVIS_TAG && $TRAVIS_TAG != '' ]]; then
export ANACONDA_API_TOKEN=$CONDA_UPLOAD_TOKEN
anaconda upload --user uncbiag bld-dir/**/mermaid-*.tar.bz2
fi