@@ -93,3 +93,109 @@ jobs:
9393 ROS_PARALLEL_TEST_JOBS : " -j4"
9494 CATKIN_TOOLS_BUILD_OPTIONS : " -iv --summarize --no-status"
9595 BUILD_PKGS : ${{ matrix.BUILD_PKGS }}
96+
97+ # ROS-O setup for v4hn https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
98+ # ROS-O setup for techfak https://ros.packages.techfak.net/
99+ # note that v4hn uses ROS_DISTRO=one and techfak uses ROS_DISTRO
100+ ros-o :
101+ runs-on : ubuntu-latest
102+
103+ strategy :
104+ fail-fast : false
105+ matrix :
106+ include :
107+ - DISTRO : ubuntu:22.04
108+ ROS_ONE_VARIANT : techfak
109+ ROS_REPOSITORY_URL : " deb [trusted=yes] https://ros.packages.techfak.net jammy-testing main"
110+ ROSDEP_PACKAGE_MAPPING : " yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
111+ - DISTRO : ubuntu:24.04
112+ ROS_ONE_VARIANT : techfak
113+ ROS_REPOSITORY_URL : " deb [trusted=yes] https://ros.packages.techfak.net noble-testing main"
114+ ROSDEP_PACKAGE_MAPPING : " yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
115+
116+ container : ${{ matrix.DISTRO }}
117+
118+ env :
119+ DEBIAN_FRONTEND : noninteractive
120+
121+ steps :
122+ - name : Chcekout Source
123+ uses : actions/checkout@v3.0.2
124+
125+ - name : Setup ROS-O deb repository
126+ run : |
127+ set -x
128+ apt update && apt install -qq -y ca-certificates git
129+ echo ${{ matrix.ROS_REPOSITORY_URL }} | tee /etc/apt/sources.list.d/ros-o-builder.list
130+ ##
131+ # https://github.com/v4hn/ros-deb-builder-action/blob/b7c0ed93fde3a86b5b1027bf8f7145cad6067c90/prepare.sh#L27-L28
132+ # Canonical dropped the Debian ROS packages from 24.04 for political reasons. Wow.
133+ 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
134+ ##
135+ apt update
136+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
137+ apt install -qq -y python3-rosdep2
138+ fi
139+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
140+ # Do not install python3-rosdep2, which is an outdated version of rosdep shipped via the Ubuntu repositories (instead of ROS)!
141+ apt install -qq -y python3-rosdep
142+ rosdep init
143+ fi
144+ echo ${{ matrix.ROSDEP_PACKAGE_MAPPING }} | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
145+ rosdep update
146+ shell : bash
147+
148+ - name : Setup catkin-tools
149+ run : |
150+ set -x
151+ # setup catkin tools
152+ apt install -qq -y python3-pip
153+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
154+ pip3 install catkin-tools==0.9.4
155+ apt install -qq -y catkin
156+ fi
157+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
158+ apt install -qq -y ros-one-catkin python3-catkin-tools
159+ fi
160+ # setup build tools
161+ apt install -qq -y cmake build-essential ros-one-rosbash
162+ shell : bash
163+
164+ - name : Setup Workspace
165+ run : |
166+ source /opt/ros/one/setup.bash
167+ set -x
168+ # setup workspace
169+ mkdir -p ~/ws/src
170+ cd ~/ws/src
171+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
172+ # TODO: remove these lines and uncomment https://github.com/ubi-agni/ros-builder-action/blob/191fab06004ad5784c28cf2ba2b18f6d163a860d/ros-one.repos#L1089
173+ git clone https://github.com/locusrobotics/catkin_virtualenv.git
174+ fi
175+ ln -sf $GITHUB_WORKSPACE .
176+ rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
177+ # check all system packages are able to install, because ROS-O build deb files that needs all packages
178+ 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
179+ # catkin_tools is not available on v4hn/jammy
180+ if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then sed -i '/python3-catkin-tools/s/^/#/' rosdep-install.sh; fi
181+ sed 's/apt-get install/apt-get -y install/;/install ros-one/s/^/#/;/pip3 install/s/^/#/' rosdep-install.sh | bash -xe
182+ shell : bash
183+
184+ - name : Compile Packages
185+ run : |
186+ source /opt/ros/one/setup.bash
187+ set -x
188+ cd ~/ws/
189+ catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
190+ shell : bash
191+
192+ - name : Test Packages
193+ run : |
194+ source /opt/ros/one/setup.bash
195+ set -x
196+ cd ~/ws/
197+ rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
198+ catkin build --force-cmake --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
199+ catkin test --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
200+ catkin_test_results --verbose --all
201+ shell : bash
0 commit comments