-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
51 lines (50 loc) · 1.91 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
env:
global:
- PUBLISHED_DIR=public
matrix:
# - ROS_DISTRO=indigo DOCKER_IMAGE=ubuntu:trusty
# - ROS_DISTRO=kinetic DOCKER_IMAGE=ubuntu:xenial
- ROS_DISTRO=melodic DOCKER_IMAGE=ubuntu:bionic
- ROS_DISTRO=noetic DOCKER_IMAGE=ubuntu:focal
# due to https://github.blog/2021-09-01-improving-git-protocol-security-github/
# we need to use https:// instead of git//
git:
submodules: false
sudo: required
language: node_js
services:
- docker
branches:
except:
- master
dist: xenial
matrix:
fast_finish: true
# allow_failures:
# - env: ROS_DISTRO=melodic DOCKER_IMAGE=ubuntu:bionic
before_script:
# due to https://github.blog/2021-09-01-improving-git-protocol-security-github/
# we need to use https:// instead of git//
- i=1; while [ $i -le 3 ]; do find . -iname .gitmodules -exec ls -al {} \; -exec cat {} \; -exec sed -i s@git://github@https://github@ {} \; -exec sh -c 'cd $(dirname "$1"); git submodule sync;' sh {} \; -exec cat {} \; ; git submodule update --init --recursive || echo "OK"; i=`expr $i + 1`; done;
- git submodule update --init --recursive
#
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME from $CI_SOURCE_PATH"
script:
- docker run --rm -i -v $CI_SOURCE_PATH:$CI_SOURCE_PATH -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "ROS_DISTRO=$ROS_DISTRO" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"
after_success:
- sudo apt-get update -qq || echo "Ignore error on apt-get update"
- sudo apt-get install -qq -y catkin # .deploy.sh needs catkin_topological_order
- $CI_SOURCE_PATH/.deploy.sh
- cd $CI_SOURCE_PATH # This is for deploy section
deploy:
provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
local_dir: $PUBLISHED_DIR
target_branch: gh-pages
keep_history: false
on:
branch: kinetic-devel # set to default branch
condition: "$ROS_DISTRO = kinetic"