forked from makaveli10/ros-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (80 loc) · 2.66 KB
/
ci.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
name: Run tests
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check
run: make check_format
ros:
runs-on: ubuntu-20.04
strategy:
max-parallel: 1
matrix:
include:
- docker_image: noetic-robot
ros_distro: noetic
ros_python_version: 3
ros_version: 1
- docker_image: foxy
ros_distro: foxy
ros_python_version: 3
ros_version: 2
container:
image: ros:${{ matrix.docker_image }}
env:
SCENARIO_RUNNER_PATH: ""
DEBIAN_FRONTEND: "noninteractive"
ROS_DISTRO: ${{ matrix.ros_distro }}
ROS_VERSION: ${{ matrix.ros_version }}
ROS_PYTHON_VERSION: ${{ matrix.ros_python_version }}
steps:
# We currently cannot use checkout@v2 because git version on ros images is below 2.18
- uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Setup
run: ./install_dependencies.sh
- name: ROS2 Build, Test, Lint
if: ${{ matrix.ros_version == 2 }}
shell: bash
run: |
apt install curl -y
curl http://viking.kurg.org:8082/carlastart
source /opt/ros/$(rosversion -d)/setup.bash
colcon build --continue-on-error
# colcon test && colcon test-result
source install/setup.bash
launch_test carla_ros_bridge/test/ros_bridge_client_ros2_test.py
curl http://viking.kurg.org:8082/carlastop
- name: ROS1 Build, Test, Lint
if: ${{ matrix.ros_version == 1 }}
shell: bash
run: |
apt install curl -y
curl http://viking.kurg.org:8082/carlastart
mkdir -p $GITHUB_WORKSPACE/../catkin_ws/src
cd $GITHUB_WORKSPACE/../catkin_ws/src
ln -s $GITHUB_WORKSPACE
cd ..
catkin init
source /opt/ros/$(rosversion -d)/setup.bash
cd $GITHUB_WORKSPACE/../catkin_ws &&
rosdep update -y
rosdep install -y --from-paths src --ignore-src -r
catkin build --summarize --no-status --force-color
catkin run_tests --force-color && catkin_test_results
source devel/setup.bash
rostest carla_ros_bridge ros_bridge_client.test
cd $GITHUB_WORKSPACE
curl http://viking.kurg.org:8082/carlastop