-
Notifications
You must be signed in to change notification settings - Fork 437
115 lines (108 loc) · 3.34 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
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-latest
strategy:
matrix:
include:
#- docker_image: melodic-robot
# ros_distro: melodic
# ros_python_version: 2
# ros_version: 1
- 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
sudo apt-get install --no-install-recommends -y python3-rospkg
- name: ROS2 Build, Test, Lint
if: ${{ matrix.ros_version == 2 }}
shell: bash
run: |
source /opt/ros/$(rosversion -d)/setup.bash
colcon build --continue-on-error
# colcon test && colcon test-result
source install/setup.bash
- name: ROS1 Build, Test, Lint
if: ${{ matrix.ros_version == 1 }}
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/../catkin_ws/src
cd $GITHUB_WORKSPACE/../catkin_ws/src
ln -s $GITHUB_WORKSPACE
cd ..
source /opt/ros/$(rosversion -d)/setup.bash
catkin init
cd $GITHUB_WORKSPACE/../catkin_ws &&
catkin build --summarize --no-status --force-color
catkin run_tests --no-status --force-color && catkin_test_results
source devel/setup.bash
cd $GITHUB_WORKSPACE
# make pylint
# TODO enable pylint
debian:
runs-on: ubuntu-latest
strategy:
matrix:
include:
#- docker_image: melodic-robot
# ros_distro: melodic
# ros_python_version: 2
# ros_version: 1
- docker_image: noetic-robot
ros_distro: noetic
ros_python_version: 3
ros_version: 1
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: Build Debian Package
run: make deb