Skip to content

Commit

Permalink
Merge pull request #753 from k-okada/ci_roso
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada authored Jan 10, 2025
2 parents b7ba716 + 58af9bb commit b135d32
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,86 @@ jobs:
NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }}
TEST_PKGS : ${{ matrix.TEST_PKGS }}
BEFORE_SCRIPT : ${{ matrix.BEFORE_SCRIPT }}

# ROS-O setup https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
ros-o:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- DISTRO: ubuntu:22.04
ROS_REPOSITORY_URL: https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository

container: ${{ matrix.DISTRO }}

env:
DEBIAN_FRONTEND : noninteractive

steps:
- name: Chcekout Source
uses: actions/checkout@v3.0.2

- name: Setup ROS-O deb repository
run: |
set -x
apt update && apt install -qq -y ca-certificates
echo "deb [trusted=yes] ${{ matrix.ROS_REPOSITORY_URL }}/ ./" | tee /etc/apt/sources.list.d/ros-o-builder.list
##
# https://github.com/v4hn/ros-deb-builder-action/blob/b7c0ed93fde3a86b5b1027bf8f7145cad6067c90/prepare.sh#L27-L28
# Canonical dropped the Debian ROS packages from 24.04 for political reasons. Wow.
test "${{ matrix.DISTRO }}" = "ubuntu:24.04" && 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
##
apt update
apt install -qq -y python3-rosdep2
echo "yaml ${{ matrix.ROS_REPOSITORY_URL }}/local.yaml debian" | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
rosdep update
- name: Setup catkin-tools
run: |
set -x
# setup catkin tools
apt install -qq -y python3-pip
pip3 install catkin-tools
# setup build tools
apt install -qq -y cmake build-essential catkin ros-one-rosbash
- name: override rosdep rule to use system euslisp
run: |
set -x
apt install -qq -y curl
curl -L https://github.com/mikefarah/yq/releases/download/v4.33.3/yq_linux_amd64 -o /usr/local/bin/yq
chmod a+x /usr/local/bin/yq
yq eval -n '.euslisp.ubuntu = "euslisp-dev" | .jskeus.ubuntu = "jskeus-dev"' | tee rosdep.yaml
echo "yaml file:///$(pwd)/rosdep.yaml" | tee /etc/ros/rosdep/sources.list.d/01-local.list
rosdep update
shell: bash

- name: Setup Workspace
run: |
source /opt/ros/one/setup.bash
set -x
# setup workspace
mkdir -p ~/ws/src
cd ~/ws/src
ln -sf $GITHUB_WORKSPACE .
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
shell: bash

- name: Compile Packages
run: |
source /opt/ros/one/setup.bash
set -x
cd ~/ws/
catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} ${{ matrix.CMAKE_OPTIONS }}
shell: bash

- name: Test Packages
run: |
source /opt/ros/one/setup.bash
source ~/ws/devel/setup.bash
roscd roseus
set -x
catkin test --no-status -sv roseus
shell: bash
7 changes: 7 additions & 0 deletions roseus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ if(APPLE)
elseif((NOT ${euslisp_FOUND}) AND (NOT ${jskeus_FOUND}) AND (EXISTS ${EUS_EXECUTABLE}) AND (EXISTS ${JSKEUS_EXECUTABLE}) AND (EXISTS /usr/share/euslisp/include))
set(euslisp_PACKAGE_PATH /usr/share/euslisp)
set(euslisp_INCLUDE_DIRS /usr/share/euslisp/include)
message("-- Set euslisp_PACKAGE_PATH to ${euslisp_PACKAGE_PATH}, this might be system installed euslisp")
execute_process(COMMAND dpkg-query -W -f='\${Version}' euslisp
OUTPUT_VARIABLE euslisp_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "'" "" euslisp_VERSION "${euslisp_VERSION}")
execute_process(COMMAND dpkg-query -W -f='\${Version}' jskeus
OUTPUT_VARIABLE jskeus_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "'" "" jskeus_VERSION "${jskeus_VERSION}")
else()
find_package(euslisp REQUIRED)
find_package(jskeus REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions roseus/bin/roseus.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set -e

if [ "@APPLE@" = "1" ]; then
EUSLISP_EXE=/usr/local/bin/irteusgl # osx
elif [ "$EUSDIR" = "" ]; then
EUSLISP_EXE=`find -L /usr/bin/*eus* -type f -name irteusgl` # fix find: File system loop detected; '/usr/bin/X\11' is part of the same file system loop as '/usr/bin'.
else
EUSLISP_EXE=`find -L $EUSDIR -type f -name irteusgl` # linux
fi
Expand Down
4 changes: 4 additions & 0 deletions roseus/euslisp/roseus.l
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ always the rank of list is 2"
;;
;; first look under "~A/roseus/${ROS_DISTRO}/${PKG}" and if not check CMAKE_PREFIX_PATH/share/roseus/ros/${PKG}
(defun ros::find-load-msg-path (pkg)
(when (and (string= *eusdir* "/usr/share/euslisp/") (member pkg '("euslisp" "jskeus") :test #'string=))
(warning-message 3 "on system installed euslisp, (ros::find-load-msg-path \"~A\") is skipped~%"
*eusdir* pkg)
(return-from ros::find-load-msg-path :no-msg-package))
(let ((dirs (list ))
(ppath (unix::getenv "CMAKE_PREFIX_PATH"))
(s 0) i)
Expand Down

0 comments on commit b135d32

Please sign in to comment.