-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
62 lines (62 loc) · 1.61 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
dist: bionic
language: perl
os: linux
if: tag IS blank AND env(GITHUB_OAUTH_TOKEN) IS present AND type IN (push, pull_request, cron)
branches:
only:
- master
cache:
directories:
- perl_modules
before_install:
- cpanm local::lib
- eval "$(perl -Mlocal::lib=${PWD}/perl_modules)"
- cpanm --notest Dist::Zilla
- pip3 install pyfastaq
addons:
apt:
packages:
- dos2unix
- python3
- python3-setuptools
- python3-pip
- python3-biopython
- rsync
- file
- build-essential
- libssl-dev
- libexpat1-dev
- libdbd-mysql-perl
- cpanminus
- libz-dev
- libdb-dev
- samtools
- smalt
- bwa
- bowtie2
perl:
- "5.30"
services:
- docker
install:
- git config --local user.name "Pathogen Informatics CI"
- git config --local user.email "pathdev@sanger.ac.uk"
- export UUID=$(cat /proc/sys/kernel/random/uuid)
- git checkout -b $UUID
- export TIMESTAMP_VERSION=$(date -u '+%Y.%m.%d.%H.%M.%S.%3N')
- export TRAVIS_TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "v${TIMESTAMP_VERSION}"; else echo "$TRAVIS_BRANCH-${TIMESTAMP_VERSION}"; fi)
- sed -i 's:^version = .*$:version = '"$TIMESTAMP_VERSION"':g' dist.ini
- git commit -am "Updated the version number to $TIMESTAMP_VERSION"
- git tag $TRAVIS_TAG
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git push -q "https://${GITHUB_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}" $TRAVIS_TAG; fi
- dzil authordeps --missing | cpanm --notest
- dzil listdeps --missing | cpanm --notest
script:
- dzil build
- dzil test
deploy:
provider: releases
token: "$GITHUB_OAUTH_TOKEN"
file_glob: true
file: "*.tar.gz"
skip_cleanup: true