-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
64 lines (61 loc) · 3.95 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
# this is .traivs.yml written by -
# https://github.com/ros-infrastructure/ros_buildfarm/blob/master/doc/jobs/devel_jobs.rst
# https://github.com/ros-infrastructure/ros_buildfarm/blob/master/doc/jobs/prerelease_jobs.rst
# while this doesn't require sudo we don't want to run within a Docker container
sudo: true
dist: bionic
language: python
addons:
apt:
packages:
- 2to3
env:
global:
- JOB_PATH=/tmp/devel_job
- ABORT_ON_TEST_FAILURE=1
- INDEX_URL=https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml
matrix:
- CHECK_PYTHON2_COMPILE=true
- CHECK_PYTHON3_COMPILE=true
- ROS_DISTRO_NAME=kinetic OS_NAME=ubuntu OS_CODE_NAME=xenial ARCH=amd64 INDEX_URL=https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/7e6385e/index.yaml
- ROS_DISTRO_NAME=melodic OS_NAME=ubuntu OS_CODE_NAME=bionic ARCH=amd64
- ROS_DISTRO_NAME=noetic OS_NAME=ubuntu OS_CODE_NAME=focal ARCH=amd64
# matrix:
# allow_failures:
# - env: ROS_DISTRO_NAME=kinetic OS_NAME=ubuntu OS_CODE_NAME=xenial ARCH=amd64
install:
# check python2 compatibility
- if [ "${CHECK_PYTHON2_COMPILE}" == "true" ]; then python2 -m compileall . ; exit $?; fi
# check python3 compatibility
- if [ "${CHECK_PYTHON3_COMPILE}" == "true" ]; then bash -c "ret=0; trap 'ret=1' ERR; python3 -m compileall .; 2to3 -w -f except -f execfile -f has_key -f import -f raw_input -f zip .; git diff --exit-code . > /dev/null; echo Exitting with \$ret; exit \$ret"; exit $?; fi
# either install the latest released version of ros_buildfarm
# - pip install ros_buildfarm
# or checkout a specific branch
- git clone -b master https://github.com/ros-infrastructure/ros_buildfarm /tmp/ros_buildfarm
# force enable `rosdep update --include-eol-distros` until https://github.com/ros-infrastructure/ros_buildfarm/pull/890 released
- (cd /tmp/ros_buildfarm; git checkout f7a12d8)
- (cd /tmp; wget https://github.com/ros-infrastructure/ros_buildfarm/pull/890.diff)
- (cd /tmp/ros_buildfarm; patch -p1 < /tmp/890.diff)
- (cd /tmp/ros_buildfarm; sed -i "/# After all dependencies are installed, update ccache symlinks./a @[if testing]@\nRUN rosdep init\n@[end if]@\n" ros_buildfarm/templates/devel/devel_task.Dockerfile.em)
- (cd /tmp/ros_buildfarm; sed -i "/USER buildfarm/a @[if testing]@\nRUN rosdep update\n@[end if]@\n" ros_buildfarm/templates/devel/devel_task.Dockerfile.em)
# revert https://github.com/ros/ros_comm/pull/1879, whcih create /tmp/rostest_bin_hook/python so did not fail with rostest
- if [ "${ROS_DISTRO_NAME}" == "noetic" ]; then (cd /tmp/ros_buildfarm; sed -i "/^# After all dependencies are installed, update ccache symlinks./a @[if testing]@\nRUN apt-get install -qq -y wget patch\nRUN wget https://patch-diff.githubusercontent.com/raw/ros/ros_comm/pull/1879.diff -O /tmp/1879.diff\nRUN (cd /opt/ros/noetic/bin/; patch -R -p4 < /tmp/1879.diff )\n@[end if]@" ros_buildfarm/templates/devel/devel_task.Dockerfile.em); fi
- (mkdir -p $JOB_PATH; cp -r /tmp/ros_buildfarm $JOB_PATH) # copy to prevent from git clone ros_buildfarm
#
- pip install /tmp/ros_buildfarm
# checkout catkin for catkin_test_results script
- git clone https://github.com/ros/catkin /tmp/catkin
# run devel job for a ROS repository with the same name as this repo
- export REPOSITORY_NAME=`basename $TRAVIS_BUILD_DIR`
# use the code already checked out by Travis
- mkdir -p $JOB_PATH/ws/src
- cp -R $TRAVIS_BUILD_DIR $JOB_PATH/ws/src/
# generate the script to run a pre-release job for that target and repo
- python /tmp/ros_buildfarm/scripts/prerelease/generate_prerelease_script.py $INDEX_URL $ROS_DISTRO_NAME default $OS_NAME $OS_CODE_NAME $ARCH --output-dir $JOB_PATH --custom-rosdep-update-options=--include-eol-distros
# run the actual job which involves Docker
- cd $JOB_PATH; sh ./prerelease.sh -y
script:
# get summary of test results
- /tmp/catkin/bin/catkin_test_results $JOB_PATH/ws/test_results --all
notifications:
email: false