forked from euslisp/EusLisp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (109 loc) · 3.89 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
99
100
101
102
103
104
105
106
107
108
109
# Travis Continuous Integration Configuration File
matrix:
include:
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:trusty
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:xenial
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_armhf:trusty
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_armhf:xenial
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_arm64:trusty
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_arm64:xenial
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=debian:jessie
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/debian_arm64:jessie
- os: osx
env:
global:
- MAKEFLAGS='-j4'
notifications:
email:
recipients:
on_success: always #[always|never|change] # default: change
on_failure: always #[always|never|change] # default: always
slack: jsk-robotics:Av7tc8wj3IWkLYvlTzHE7x2g
before_install: # Use this to prepare the system to install prerequisites or dependencies
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# use stable rvm to avoid "shell_session_update: command not found" error on OSX.
# https://github.com/travis-ci/travis-ci/issues/6307
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; command curl -sSL https://rvm.io/mpapis.asc | gpg --import -; then rvm get stable; fi
# Define some config vars
install:
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static; fi
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/euslisp/jskeus ${HOME}/jskeus; fi
script:
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run --rm -i -v $HOME:$HOME -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ./.travis.sh; fi
after_failure:
- echo "failure"
after_success:
- sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
- (cd doc/latex; make; make html)
- (cd doc/jlatex; make; make html)
- git checkout doc/html/index.html # do not overwrite
deploy:
provider: releases
api_key: "$GH_TOKEN"
file:
- doc/latex/manual.pdf
- doc/jlatex/jmanual.pdf
skip_cleanup: true
on:
tags: true
condition: "$DOCKER_IMAGE = ubuntu:trusty"
after_deploy:
# set user info
- git config --global user.email [email protected]
- git config --global user.name "Kei Okada"
# recover from detached
- git remote add upstream https://github.com/$TRAVIS_REPO_SLUG
- git fetch --all
- git checkout -b $(git name-rev --name-only $(git rev-parse $TRAVIS_BRANCH) | sed 's@remotes/upstream/@@')
# send doc to current repo
- git rm -f doc/{latex,jlatex,html}/*.{pdf,ps,dvi,html,png}
- git add doc/{latex,jlatex}/*.{pdf,ps,dvi} doc/html/*.{html,png}
- git status
- git branch
- git commit -m "Build documents from $TRAVIS_TAG@$TRAVIS_COMMIT" doc/
- git push https://[email protected]/$TRAVIS_REPO_SLUG.git $(git rev-parse --abbrev-ref HEAD)
# send html to gh-pages
- git clone --branch gh-pages https://github.com/$TRAVIS_REPO_SLUG gh-pages
- cd gh-pages
- git rm -f *
- cp $CI_SOURCE_PATH/doc/html/* ./
- git add -f .
- git commit -m "Build documents from $TRAVIS_TAG@$TRAVIS_COMMIT" .
- git push https://[email protected]/$TRAVIS_REPO_SLUG.git gh-pages