forked from sigven/pcgr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (48 loc) · 2.18 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
sudo: required
language: python
python:
- "3.7" # required, otherwise conda will try to clash with py2 packages
services:
- docker
before_install:
# Get and install anaconda (https://conda.io/docs/travis.html)
- wget -nv https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- 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 conda
- conda info -a # Useful for debugging any issues with conda
install:
- export PACKAGE_NAME=pcgr
- if test -z "$TRAVIS_TAG" ; then export VERSION="0.0.1" ; else export VERSION="${TRAVIS_TAG//v/}" ; fi
# Setting up channels and install dependencies
- conda config --add channels bioconda --add channels conda-forge --add channels pcgr --add channels local
- conda install -q python=$TRAVIS_PYTHON_VERSION pip requests conda-build jinja2 anaconda-client
# Building packages
- conda build install_no_docker/conda_pkg/${PACKAGE_NAME}
- conda build install_no_docker/conda_pkg/${PACKAGE_NAME}_dockerized
# Installing
- conda install "${PACKAGE_NAME}==${VERSION}"
# Pulling reference data
# - wget https://raw.githubusercontent.com/circulosmeos/gdown.pl/master/gdown.pl
# - perl gdown.pl "https://drive.google.com/uc?id=1TdYagetk-l__aYBsaZJHJvYFStDnIEcq" grch37.tar.gz
# - tar -xzf grch37.tar.gz # will extract into ./data/grch37/
# - gdown https://drive.google.com/uc?id=1TdYagetk-l__aYBsaZJHJvYFStDnIEcq -O - | tar xzf - # grch37
script:
# Condarized installation:
- pcgr.py --version
- python -c "import pcgr"
# - pcgr.py
# --input_vcf examples/tumor_sample.BRCA.vcf.gz
# --input_cna examples/tumor_sample.BRCA.cna.tsv
# . ./examples grch37 examples/examples_BRCA.toml tumor_sample.BRCA --tumor_type 6 --no-docker
deploy:
# Deploy to Anaconda.org
- provider: script
script:
conda convert --platform osx-64 $HOME/miniconda/conda-bld/linux-64/${PACKAGE_NAME}_dockerized-*.tar.bz2 --output-dir $HOME/miniconda/conda-bld/ &&
anaconda -t ${ANACONDA_TOKEN} upload -u pcgr $HOME/miniconda/conda-bld/**/${PACKAGE_NAME}*.tar.bz2
on:
tags: true
skip_cleanup: true