-
Notifications
You must be signed in to change notification settings - Fork 2
192 lines (160 loc) · 8.13 KB
/
ros.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
################################################################################
# This workflow will do a clean install of project dependencies, build the
# source code and run tests.
################################################################################
name: OASIS ROS
# Controls when the action will run. Triggers the workflow on push or pull
# request events
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in
# parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
ros1_distro: noetic
ros2_distro: iron
#- os: macbook
# ros1_distro: noetic
# ros2_distro: galactic
# Steps represent a sequence of tasks that will be executed as part of the
# job
steps:
- name: Build environment information
run: 'echo "Matrix OS: ${{ matrix.os }} on $HOSTNAME with $(getconf _NPROCESSORS_ONLN) cores"'
# Check-out the repository under $GITHUB_WORKSPACE, so the job can
# access it
- name: Checkout main repo
uses: actions/checkout@v2
- name: Restore Python
id: restore-python
if: matrix.os != 'macbook'
uses: actions/cache@v2
with:
path: |
ros-ws/python/install
key: restore-python-${{ matrix.os }}-${{ hashFiles('oasis_tooling/scripts/*python.sh') }}
- name: Restore CMake
id: restore-cmake
if: matrix.os != 'macbook'
uses: actions/cache@v2
with:
path: |
ros-ws/cmake/install
key: restore-cmake-${{ matrix.os }}-${{ hashFiles('oasis_tooling/scripts/*cmake.sh') }}
# Skip ROS 1 on ubuntu-18.04, ubuntu-20.04 and macbook
#- name: Restore ROS 1 Desktop
# id: restore-ros1-desktop
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook'
# uses: actions/cache@v2
# with:
# path: |
# ros-ws/ros1-desktop-${{ matrix.ros1_distro }}/install
# key: restore-ros1-desktop-${{ matrix.os }}-${{ matrix.ros1_distro }}-${{ hashFiles('oasis_tooling/scripts/*ros1_desktop.sh') }}
- name: Restore ROS 2 Desktop
id: restore-ros2-desktop
uses: actions/cache@v2
with:
path: |
ros-ws/ros2-desktop-${{ matrix.ros2_distro }}/install
key: restore-ros2-desktop-${{ matrix.os }}-${{ matrix.ros2_distro }}-${{ hashFiles('oasis_tooling/config/iceoryx/**', 'oasis_tooling/config/ros2_desktop/**', 'oasis_tooling/config/rviz/**', 'oasis_tooling/config/yaml_cpp_vendor/**', 'oasis_tooling/scripts/*ros2_desktop.sh') }}
- name: Restore OASIS dependencies
id: restore-oasis-depends
uses: actions/cache@v2
with:
path: |
ros-ws/oasis-depends-${{ matrix.ros2_distro }}/install
key: restore-oasis-depends-${{ matrix.os }}-${{ matrix.ros2_distro }}-${{ hashFiles('oasis_tooling/config/iceoryx/**', 'oasis_tooling/config/ros2_desktop/**', 'oasis_tooling/config/rviz/**', 'oasis_tooling/config/yaml_cpp_vendor/**', 'oasis_tooling/scripts/*ros2_desktop.sh') }}-${{ hashFiles('oasis_tooling/config/depends.repos', 'oasis_tooling/config/image_transport_plugins/**', 'oasis_tooling/config/libcec/**', 'oasis_tooling/config/libfreenect2/**', 'oasis_tooling/config/OpenNI/**', 'oasis_tooling/config/orb-slam3/**', 'oasis_tooling/config/p8-platform/**', 'oasis_tooling/config/pangolin/**', 'oasis_tooling/config/vision_opencv/**', 'oasis_tooling/scripts/*oasis_deps.sh') }}
- name: Restore Arduino IDE
id: restore-arduino-ide
uses: actions/cache@v2
with:
path: |
oasis_avr/arduino-*
key: restore-arduino-ide-${{ matrix.os }}-${{ hashFiles('oasis_avr/bootstrap.sh') }}
- name: Install system dependencies
if: matrix.os != 'starship' && matrix.os != 'cinder' && matrix.os != 'macbook'
run: |
sudo apt update
sudo apt install -y build-essential cmake git
# TODO: This was needed to link oasis_drivers_cpp
- name: Install libspdlog-dev
if: matrix.os != 'ubuntu-18.04'
run: |
sudo apt install -y libspdlog-dev
#
# TODO: This is needed because rosdep fails with error:
#
# The following packages have unmet dependencies:
# libomp-dev : Depends: libomp5 (= 5.0.1-1)
# E: Unable to correct problems, you have held broken packages.
#
- name: Install oasis_kinect2 dependencies
if: matrix.os == 'ubuntu-18.04'
run: |
sudo apt install -y libomp5
- name: Install Python dependencies
if: matrix.os != 'macbook' && steps.restore-python.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/depinstall_python.sh
- name: Build Python
if: matrix.os != 'macbook' && steps.restore-python.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/build_python.sh
- name: Install CMake dependencies
if: matrix.os != 'macbook' && steps.restore-cmake.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/depinstall_cmake.sh
- name: Build CMake
if: matrix.os != 'macbook' && steps.restore-cmake.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/build_cmake.sh
#- name: Install ROS 1 Desktop dependencies
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true'
# run: ./oasis_tooling/scripts/depinstall_ros1_desktop.sh
#- name: Fix empy install for ROS 1
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true'
# run: |
# sudo apt install -y python3-empy
# sudo ln -s -f /usr/bin/empy3 /usr/bin/empy
#- name: Fix missing Python 2 packages for ROS 1
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true'
# run: |
# sudo apt install python2
# curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
# sudo python2 get-pip.py
# python2 -m pip install --upgrade catkin_pkg empy pip PyYAML setuptools
#- name: Build ROS 1 Desktop
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true'
# run: ./oasis_tooling/scripts/build_ros1_desktop.sh
- name: Install ROS 2 Desktop dependencies
if: steps.restore-ros2-desktop.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/depinstall_ros2_desktop.sh
- name: Build ROS 2 Desktop
if: steps.restore-ros2-desktop.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/build_ros2_desktop.sh
- name: Install OASIS dependency rosdeps
if: steps.restore-oasis-depends.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/depinstall_oasis_deps.sh
- name: Build OASIS dependencies
if: steps.restore-oasis-depends.outputs.cache-hit != 'true'
run: ./oasis_tooling/scripts/build_oasis_deps.sh
- name: Install OASIS rosdeps
run: ./oasis_tooling/scripts/depinstall_oasis.sh
- name: colcon build
run: ./oasis_tooling/scripts/build_oasis.sh
- name: Install OASIS files
run: ./oasis_tooling/scripts/install_oasis.sh
#- name: Upload Ardino hex to /dev/ttyACM0
# if: matrix.os == 'cinder'
# run: |
# ./oasis_avr/scripts/reset_leonardo.py /dev/ttyACM0
# sleep 2
# source oasis_tooling/scripts/env_ros2_desktop.sh && cmake --build "build/oasis_avr" --target upload -- TARGET=firmata_node SERIAL_PORT=/dev/ttyACM0
# sleep 2
#- name: Test Ardino
# if: matrix.os == 'cinder'
# run: |
# source install/setup.bash && ros2 run oasis_drivers_py firmata_test