forked from aymara/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (61 loc) · 2.57 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
sudo: required
language: cpp
branches:
except:
- /^\d\d\d\d\d\d\d\d\d\d\d\d\d\d-[\da-f]+$/
services:
- docker
env:
global:
# One of them is GITHUB_TOKEN
- secure: FlsmywHiGR6VKejCGcEd59rhvk5YI1f+FUAWfBLVxzqG4haLGT0MQwyxDr2EPS3Iu+v16nsMxHT2dwMCotC8zTPSmHUr6evE4jpNcqs+vIOAz7VLjdqwD0jweeguOR4JxL1XcgFZMAPTnoQFBFZlEOFu8OxaDjOoG7Oj0iGH+Fo=
- secure: 89MWEONx9hRT4aMMxqTcwHVfErXx7lYuL2jirVk5qhdZhJ7GzuOgd/FjDNhyJmZxy77BcYe60vvvPsRwjst1XOUKLQ35QnIaGcN29GVhZksyW1K0qSqRr/gjf+2yDLuqZZ/OmCHDEzoNaKD3BC+weKA5J2j4qmeBEB05HKOAVZQ=
- USE_TENSORFLOW=false
matrix:
include:
- os: linux
env: DISTRIB=travis-ubuntu18.04
- os: linux
env: DISTRIB=travis-ubuntu18.04 USE_TENSORFLOW=true
- os: linux
env: DISTRIB=travis-ubuntu16.04
- os: linux
env: DISTRIB=debian9.4
before_script:
- echo TRAVIS_BRANCH=$TRAVIS_BRANCH
script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo BRANCH=$BRANCH
- docker build --tag $DISTRIB --build-arg JOB_NUMBER=$TRAVIS_JOB_NUMBER --build-arg BRANCH="$BRANCH" --build-arg GITHUB_TOKEN="$GITHUB_TOKEN" --build-arg USE_TENSORFLOW="$USE_TENSORFLOW" -f ./continuous_integration/Dockerfile-$DISTRIB .
after_success:
- docker run --name travis-ubuntu18.04 -t -d travis-ubuntu18.04
- docker cp $(docker ps -n 1 -q):/usr/share/apps/lima/packages $HOME
- docker stop travis-ubuntu18.04
- docker run --name travis-ubuntu16.04 -t -d travis-ubuntu16.04
- docker cp $(docker ps -n 1 -q):/usr/share/apps/lima/packages $HOME
- docker stop travis-ubuntu16.04
- docker run --name debian9.4 -t -d debian9.4
- docker cp $(docker ps -n 1 -q):/usr/share/apps/lima/packages/ $HOME
- docker stop debian9.4
before_deploy:
- git config --local user.name "Gael de Chalendar"
- git config --local user.email "[email protected]"
- git tag "$(git log --date=iso -1 | grep Date | sed -e 's/Date:\ *//' -e 's/\+.*//' -e 's/[- :]//g')-$(git log --format=%h --abbrev=8 -1)" || true
deploy:
- provider: releases
api_key:
secure: u0jcRYK9fsJ9ymnpU8ET5dd/DZ/rwah2WhOrfQGUkBM+VB2ASol1KCz8EMMwNQM44echMHz6LwxWM9np9vBUZZCgt/riU/vEVW7Dkmjyiwbscov7qbDmsLDdQy7LxFpEh+dA8m6U9thyWxBdtoDzDX8+3G0Oxfjf4cIa3eyAFv0=
file_glob: true
file: $HOME/packages/*.deb
skip_cleanup: true
on:
repo: aymara/lima
tags: false
branches:
except:
- /^\d\d\d\d\d\d\d\d\d\d\d\d\d\d-[\da-f]+$/
#- provider: script
#script: bash continuous_integration/docker_push.sh
#on:
#branch: master
#condition: $DISTRIB = travis-ubuntu18.04