forked from euslisp/jskeus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (58 loc) · 4.06 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
# Travis Continuous Integration Configuration File
language:
- cpp
compiler:
- gcc
notifications:
email:
recipients:
- euslisp@jsk.t.u-tokyo.ac.jp
on_success: always #[always|never|change] # default: change
on_failure: always #[always|never|change] # default: always
slack: jsk-robotics:Av7tc8wj3IWkLYvlTzHE7x2g
env:
- secure: "u0lUaQ+BR5IH2bJNmGPZ8Yp5/iroJiHNkADN6lvMMqS9FQc8kcEe74UgsTjMdteQXRsDTtJVmwB7UFB83bwwcKoVYwrGAdOfBkWM702hTgmEIqKTkBkaVyUjkzR/VrnVCHCLhQMysAuHQyPrEPjLlvmKiJJ/OYfRg2QCd74ef1I="
before_install: # Use this to prepare the system to install prerequisites or dependencies
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# Define some config vars
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- sudo apt-get update -qq
- sudo apt-get install -qq -y subversion gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng12-dev xfonts-100dpi xfonts-75dpi msttcorefonts texlive-latex-base ptex-bin latex2html nkf poppler-utils
install: # Use this to install any prerequisites or dependencies necessary to run your build
- cd ${HOME}
- ln -s $CI_SOURCE_PATH jskeus
script: # All commands must exit with code 0 on success. Anything else is considered failure.
- cd jskeus
- make
- source bashrc.eus
- find irteus/test -iname "*.l" | grep -v unittest.l | xargs -n1 irteusgl
after_success:
- export GIT_COMMITTER_NAME=$GIT_NAME
- export GIT_COMMITTER_EMAIL=$GIT_EMAIL
- export GIT_AUTHOR_NAME=$GIT_NAME
- export GIT_AUTHOR_EMAIL=$GIT_EMAIL
- (cd doc/; pdftotext jmanual.pdf; mv jmanual.txt jmanual.txt.old; make; pdftotext jmanual.pdf)
- (cd doc/; make html)
- cd doc
- if [ "$TRAVIS_BRANCH" == "master" ]; then diff jmanual.txt jmanual.txt.old || (git add -f *.pdf *.dvi; git commit -m "add documents for $TRAVIS_COMMIT"); fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git checkout master; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git merge HEAD@{1}; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git push --quiet https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git master; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd ~/; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git clone --branch gh-pages https://github.com/$TRAVIS_REPO_SLUG doc; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd doc; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git reset --hard bb420562a8d224491784081ed51536d0e9aaf072
- if [ "$TRAVIS_BRANCH" == "master" ]; then cp -r ~/jskeus/doc/html/* ./; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git add -f .; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git commit -m "Build documents from $TRAVIS_COMMIT" . ; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git push -f --quiet https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages; fi
# upload to euslisp-docs
- if [ "$TRAVIS_BRANCH" == "master" ]; then git clone https://k-okada:$GH_TOKEN@github.com/jsk-ros-pkg/euslisp-docs.git /tmp/euslisp-docs; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd /tmp/euslisp-docs; git remote rm origin; git remote add origin https://k-okada:$GH_TOKEN@github.com/jsk-ros-pkg/euslisp-docs.git; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd ${CI_SOURCE_PATH}/doc; git clean -xfd; sed -i 's@rm -fr@#rm -fr@g' Makefile; sed -i 's@\euslisptrue@\euslispfalse@g' jmanual.tex; awk 'BEGIN{flg=1}; {if (/^\\ifeuslisp/) {flg=0}; if(flg>0)print; if (/^\\fi/) {flg=1} };' jmanual.tex > jmanual.tex.tmp; mv jmanual.tex.tmp jmanual.tex ; rm -fr html; make TMPDIR=/tmp; cp /tmp/*.tex ./; cp ../eus/doc/jlatex/*.sty .; ${CI_SOURCE_PATH}/.upload-doc.sh; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then mkdir -p /tmp/euslisp-docs/docs/jskeus; cd /tmp/euslisp-docs/docs; cp /tmp/html/*.{jpg,png,md} jskeus/; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then git add jskeus/*.{md,jpg,png}; git commit -m "Update jskeus form https://github.com/$TRAVIS_REPO_SLUG/tree/$TRAVIS_COMMIT"; git push -fq origin master; fi
after_failure:
- echo "failure"