-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
84 lines (81 loc) · 2.51 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
dist: bionic
services: docker
language: bash
addons:
apt:
packages:
- python3-pip
- python3-setuptools
cache:
apt: true
directories:
- ${HOME}/.local/bin
- ${HOME}/.local/lib
- ${HOME}/docker
env:
global:
- PACKAGE_NAME=mcl_3dl
- DATASET_CACHE_DIR=/home/travis/docker/dataset
- DATASET_FILE=short_test3.bag
- DATASET_REF_FILE=short_test_ref.topic
matrix:
- ROS_DISTRO_TARGET=melodic
- ROS_DISTRO_TARGET=kinetic
branches:
only:
- master
before_install:
- .travis/cache_dataset.sh
- python3 -m pip install --upgrade --user gh-pr-comment
script:
- BUILD_LINK="[[#${TRAVIS_BUILD_NUMBER}](${TRAVIS_BUILD_WEB_URL})]"
- |
docker build \
-t ${PACKAGE_NAME}:${ROS_DISTRO_TARGET} \
-f .travis/Dockerfile \
--build-arg ROS_DISTRO=${ROS_DISTRO_TARGET} \
--pull=true ${TRAVIS_BUILD_DIR} \
|| (gh-pr-comment "${BUILD_LINK} FAILED on ${ROS_DISTRO_TARGET}" "docker build failed"; false)
- |
docker run --rm \
-e TRAVIS_PULL_REQUEST \
-e TRAVIS_REPO_SLUG \
-e TRAVIS_BOT_GITHUB_TOKEN \
-e GITHUB_API_URL_BASE \
-e BUILD_LINK=${BUILD_LINK} \
$(bash <(curl -s https://codecov.io/env)) \
${PACKAGE_NAME}:${ROS_DISTRO_TARGET} \
/catkin_ws/src/${PACKAGE_NAME}/.travis/test.sh
jobs:
include:
- stage: test
env:
- ROS_DISTRO_TARGET=noetic
script:
- BUILD_LINK="[[#${TRAVIS_BUILD_NUMBER}](${TRAVIS_BUILD_WEB_URL})]"
- |
docker run -it --rm \
-v $(pwd):/src/$(basename $(pwd)):ro \
alpineros/ros-abuild:3.11-noetic \
&& gh-pr-comment "${BUILD_LINK} PASSED on ${ROS_DISTRO_TARGET}" \
"Tested on Alpine ROS" \
|| (gh-pr-comment "${BUILD_LINK} FAILED on ${ROS_DISTRO_TARGET}" \
"Tested on Alpine ROS"; false) \
- stage: prerelease-test
if: head_branch =~ ^release-.*$
env:
- ROS_DISTRO_TARGET=kinetic
before_install: python3 -m pip install --upgrade --user gh-pr-comment
script: .travis/prerelease_test.sh
- stage: prerelease-test
if: head_branch =~ ^release-.*$
env:
- ROS_DISTRO_TARGET=melodic
before_install: python3 -m pip install --upgrade --user gh-pr-comment
script: .travis/prerelease_test.sh
- stage: prerelease-test
if: head_branch =~ ^release-.*$
env:
- ROS_DISTRO_TARGET=noetic
before_install: python3 -m pip install --upgrade --user gh-pr-comment
script: .travis/prerelease_test.sh