File: .travis.yml

package info (click to toggle)
euslisp 9.27%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 55,344 kB
  • sloc: ansic: 41,162; lisp: 3,339; makefile: 256; sh: 208; asm: 138; python: 53
file content (105 lines) | stat: -rw-r--r-- 5,157 bytes parent folder | download
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
# Travis Continuous Integration Configuration File
os: linux
dist: bionic
sudo: required
cache: apt
services: docker
matrix:
  include:
    - env: DOCKER_IMAGE=ubuntu:trusty
    - env: DOCKER_IMAGE=ubuntu:xenial
    - env: DOCKER_IMAGE=ubuntu:bionic
    - env: DOCKER_IMAGE=ubuntu:trusty ROS_DISTRO=indigo
    - env: DOCKER_IMAGE=ubuntu:xenial ROS_DISTRO=kinetic
    - env: DOCKER_IMAGE=ubuntu:bionic ROS_DISTRO=melodic
    - env: DOCKER_IMAGE=osrf/ubuntu_armhf:trusty
    - env: DOCKER_IMAGE=osrf/ubuntu_armhf:xenial
    - env: DOCKER_IMAGE=osrf/ubuntu_arm64:trusty
    - env: DOCKER_IMAGE=osrf/ubuntu_arm64:xenial
    - env: DOCKER_IMAGE=debian:stretch
    - env: DOCKER_IMAGE=osrf/debian_arm64:stretch
    - env: QEMU=amd64 DOCKER_IMAGE=amd64/debian:unstable # amd64
    - env: QEMU=aarch64 DOCKER_IMAGE=arm64v8/debian:buster # arm64
    - env: QEMU=arm DOCKER_IMAGE=arm32v5/debian:jessie # armel
    - env: QEMU=arm DOCKER_IMAGE=arm32v7/debian:jessie # armhf
    # hppa
    # hurd-i386
    - env: QEMU=i386 DOCKER_IMAGE=i386/debian:unstable # i386
    # ia64
    # m68k
    - env: QEMU=mips64el DOCKER_IMAGE=loongnix/debian:buster # mips64el
    # mipsel
    # - env: QEMU=ppc DOCKER_IMAGE=vicamo/debian:unstable-powerpc # powerpc / somehow failing loading eusgl
    - env: QEMU=ppc64le DOCKER_IMAGE=ppc64le/debian:buster # ppc64
    # riscv64
    # sh4
    # sparc64
    - os: osx
env:
  global:
    - MAKEFLAGS='-j4'
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
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" ]]; then set -x; gpg --version; gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB || command curl -sSL https://rvm.io/mpapis.asc | gpg --import -; rvm get stable; set +x; fi
  # Define some config vars
install:
  - export CI_SOURCE_PATH=$(pwd)
  - export REPOSITORY_NAME=${PWD##*/}
  - if [[ "$QEMU" != "" ]]; then sudo apt-get install -y -qq qemu-user-static; ls /usr/bin/qemu-*-static; export QEMU_VOLUME="-v /usr/bin/qemu-$QEMU-static:/usr/bin/qemu-$QEMU-static" ; fi
  - if [[ "$QEMU" != "" ]]; then docker run --rm --privileged multiarch/qemu-user-static:register; fi
  - 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 on $QEMU_VOLUME"
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run --rm -i $QEMU_VOLUME -v $HOME:$HOME -e "QEMU=$QEMU" -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"; fi
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then ./.travis.sh; fi
after_failure:
  - echo "failure"
after_success:
  - if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils; fi
  - if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then (cd doc/latex;  make; make html); fi
  - if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then (cd doc/jlatex; make; make html); fi
  - if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then git checkout doc/html/index.html; fi # 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 k-okada@jsk.t.u-tokyo.ac.jp
  - 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,hlp} doc/html/*.{html,png}
  - git status
  - git branch
  - git commit -m "Build documents from $TRAVIS_TAG@$TRAVIS_COMMIT" doc/
  - git push https://$GH_TOKEN@github.com/$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://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages