forked from scilus/scilpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (46 loc) · 1.88 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
dist: bionic
language: python
python:
- "3.6"
- "3.7"
- "3.8"
before_install:
- sudo wget -O- http://neuro.debian.net/lists/bionic.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
- sudo apt-key adv --recv-keys --keyserver pool.sks-keyservers.net 2649A5A9 || { sudo wget -q -O- http://neuro.debian.net/_static/neuro.debian.net.asc | sudo apt-key add -; }
- sudo apt-get update
- sudo apt-get update
- sudo apt-get install -y singularity-container
- sudo apt-get install build-essential libblas-dev liblapack-dev python3-tk
stage: Tests
script:
- python setup.py develop
- export MPLBACKEND="agg"
- pytest -v
jobs:
include:
- stage: Deploy Docker latest
if: branch = master AND type = push
script:
- travis_wait 60 docker build -t docker-scilpy containers
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag docker-scilpy $DOCKER_USERNAME/docker-scilpy:latest
- travis_wait 60 docker push $DOCKER_USERNAME/docker-scilpy:latest
- stage: Deploy Docker release
if: tag IS present
script:
- travis_wait 60 docker build -t docker-scilpy containers
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag docker-scilpy $DOCKER_USERNAME/docker-scilpy:$TRAVIS_TAG
- travis_wait 60 docker push $DOCKER_USERNAME/docker-scilpy:$TRAVIS_TAG
- stage: Deploy Singularity release
if: tag IS present
script:
- travis_wait 60 sudo singularity build singularity_scilpy_${TRAVIS_TAG}.img containers/singularity_scilpy.def
- singularity exec singularity_scilpy_${TRAVIS_TAG}.img echo "Singularity test"
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: singularity_scilpy_${TRAVIS_TAG}.img
skip_cleanup: true
on:
tags: true