@@ -142,66 +142,72 @@ jobs:
142142 DOCKER_IMAGE_JENKINS : ${{ matrix.DOCKER_IMAGE_JENKINS }}
143143 TIMEOUT_JENKINS : 180
144144
145- # ROS-O setup https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
145+ # ROS-O setup for v4hn https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
146+ # ROS-O setup for techfak https://ros.packages.techfak.net/
147+ # note that v4hn uses ROS_DISTRO=one and techfak uses ROS_DISTRO
146148 ros-o :
147- runs-on : ubuntu-latest
148-
149149 strategy :
150150 fail-fast : false
151151 matrix :
152- include :
153- - DISTRO : ubuntu:22.04
154- ROS_REPOSITORY_URL : https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository
152+ DEB_DISTRO : [22.04, 24.04]
153+ ARCH : [x64]
154+ ROS_ONE_VARIANT : [techfak]
155+ BUILD_PKGS : ['jsk_recognition_msgs audio_to_spectrogram sound_classification', 'checkerboard_detector imagesift jsk_perception jsk_recognition_utils resized_image_transport', 'jsk_pcl_ros_utils jsk_pcl_ros']
155156
156- container : ${{ matrix.DISTRO }}
157+ runs-on : ${{ matrix.ARCH == 'x64' && format('ubuntu-{0}', matrix.DEB_DISTRO) || (matrix.ARCH == 'arm64' && format('ubuntu-{0}-arm', matrix.DEB_DISTRO) || format('ubuntu-{0}', matrix.DEB_DISTRO)) }}
157158
158159 env :
159160 DEBIAN_FRONTEND : noninteractive
160161
161162 steps :
162- - name : Install git on container
163- run : |
164- apt update && apt install -y -q -qq git
165-
166163 - name : Chcekout Source
167164 uses : actions/checkout@v3.0.2
168- with :
169- submodules : recursive
170165
171166 - name : Setup ROS-O deb repository
172167 run : |
173168 set -x
174- apt update && apt install -qq -y ca-certificates
175- echo "deb [trusted=yes] ${{ matrix.ROS_REPOSITORY_URL }}/ ./" | tee /etc/apt/sources.list.d/ros-o-builder.list
176- apt update
177- apt install -qq -y python3-rosdep2
178- echo "yaml ${{ matrix.ROS_REPOSITORY_URL }}/local.yaml debian" | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
169+ sudo apt update && sudo apt install -qq -y ca-certificates git
170+ if [[ "${{ matrix.DEB_DISTRO }}" == "22.04" ]]; then export CODE_NAME="jammy"; fi
171+ if [[ "${{ matrix.DEB_DISTRO }}" == "24.04" ]]; then export CODE_NAME="noble"; fi
172+ echo "deb [trusted=yes] https://ros.packages.techfak.net $CODE_NAME-testing main" | sudo tee /etc/apt/sources.list.d/ros-o-builder.list
173+ ##
174+ # https://github.com/v4hn/ros-deb-builder-action/blob/b7c0ed93fde3a86b5b1027bf8f7145cad6067c90/prepare.sh#L27-L28
175+ # Canonical dropped the Debian ROS packages from 24.04 for political reasons. Wow.
176+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" && "${{ matrix.DISTRO }}" == "ubuntu:24.04" ]]; then apt install -y software-properties-common retry && retry -d 50,10,30,300 -t 12 add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/ros; fi
177+ ##
178+ sudo apt update
179+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
180+ sudo apt install -qq -y python3-rosdep2
181+ fi
182+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
183+ # Do not install python3-rosdep2, which is an outdated version of rosdep shipped via the Ubuntu repositories (instead of ROS)!
184+ sudo apt install -qq -y python3-rosdep
185+ sudo rosdep init
186+ fi
187+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
188+ export ROSDEP_PACKAGE_MAPPING="yaml https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository/local.yaml debian"
189+ fi
190+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
191+ export ROSDEP_PACKAGE_MAPPING="yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
192+ fi
193+ echo $ROSDEP_PACKAGE_MAPPING | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
179194 rosdep update
195+ shell : bash
180196
181197 - name : Setup catkin-tools
182198 run : |
183199 set -x
184200 # setup catkin tools
185- apt install -qq -y python3-pip
186- pip3 install catkin-tools
201+ sudo apt install -qq -y python3-pip
202+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
203+ pip3 install catkin-tools==0.9.4
204+ sudo apt install -qq -y catkin
205+ fi
206+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
207+ sudo apt install -qq -y ros-one-catkin python3-catkin-tools
208+ fi
187209 # setup build tools
188- apt install -qq -y cmake build-essential catkin ros-one-rosbash
189-
190- - name : Download unreleased files
191- run : |
192- source /opt/ros/one/setup.bash
193- set -x
194- apt install -qq -y git wget
195- mkdir -p ~/ws/src
196- cd ~/ws/src
197- # rosinstall_generator libsiftfast --rosdistro noetic
198- git clone https://github.com/tork-a/jsk_3rdparty-release.git -b release/noetic/libsiftfast/2.1.28-1
199- wget https://github.com/jsk-ros-pkg/jsk_3rdparty/commit/cafbff6dd2bd7869eb4f989bedd0a322a7c35d50.diff -O 1.patch
200- wget https://github.com/jsk-ros-pkg/jsk_3rdparty/commit/c8eb21e211d1a8f803cd55549a5b2bdc87e6ff9f.diff -O 2.patch
201- patch -d jsk_3rdparty-release -p3 < 1.patch
202- patch -d jsk_3rdparty-release -p3 < 2.patch
203- # rosinstall_generator jsk_topic_tools --rosdistro noetic
204- git clone https://github.com/tork-a/jsk_common-release.git -b release/noetic/jsk_topic_tools/2.2.15-4
210+ sudo apt install -qq -y cmake build-essential ros-one-rosbash
205211 shell : bash
206212
207213 - name : Setup Workspace
@@ -213,13 +219,34 @@ jobs:
213219 cd ~/ws/src
214220 ln -sf $GITHUB_WORKSPACE .
215221 rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
222+ # check all system packages are able to install, because ROS-O build deb files that needs all packages
223+ PIP_BREAK_SYSTEM_PACKAGES=1 rosdep install -qq --simulate -y --from-path . --ignore-src -t exec -t buildtool_export -t buildtool -t build -t build_export | tee rosdep-install.sh
224+ # catkin_tools is not available on v4hn/jammy
225+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then sed -i '/python3-catkin-tools/s/^/#/' rosdep-install.sh; fi
226+ sed 's/apt-get install/apt-get -y install/;/install ros-one/s/^/#/;/pip3 install/s/^/#/' rosdep-install.sh | bash -xe
227+ shell : bash
228+
229+ - name : Check local installed python
230+ run : |
231+ set -x
232+ pip freeze --local | cut -d= -f1 | xargs -n1 pip show | grep -E '^(Name|Location|Version)' || echo "OK"
233+ shell : bash
234+
235+ - name : Clean Disk space
236+ run : |
237+ set -x
238+ df -h
239+ ls -al /opt/
240+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true
241+ sudo apt clean
242+ df -h
216243 shell : bash
217244
218245 - name : Compile Packages
219246 run : |
220247 source /opt/ros/one/setup.bash
221248 set -x
222249 cd ~/ws/
223- catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
250+ catkin build ${{ matrix.BUILD_PKGS }} ${{ matrix.DEB_DISTRO == '22.04' && '-j4' || '' }} --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
224251 shell : bash
225252
0 commit comments