From 827a33accdc29c7fdb11a74c7a62445b84a8f692 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 9 Dec 2024 11:34:31 +0900 Subject: [PATCH 1/4] fix CI, override node20 https://github.com/actions/upload-artifact/issues/616#issuecomment-2350667347 --- .github/workflows/config.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index a64a40889..e1872ed7b 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -40,7 +40,11 @@ jobs: BEFORE_SCRIPT : "find $GITHUB_WORKSPACE -iname image_view2 -exec touch {}/CATKIN_IGNORE \\;" - container: ${{ matrix.CONTAINER }} + container: + image: ${{ matrix.CONTAINER }} + volumes: + - /tmp/node20:/__e/node20 + steps: - name: Install latest git ( use sudo for ros-ubuntu ) run: | @@ -63,6 +67,21 @@ jobs: git config --global --add safe.directory $GITHUB_WORKSPACE fi + - name: Try to replace `node` with an glibc 2.17 + shell: bash + run: | + if [ "${{ matrix.CONTAINER }}" = "jskrobotics/ros-ubuntu:14.04" ]; then + export USER=$(whoami) + sudo chmod 777 -R /__e/node20 + sudo chown -R $USER /__e/node20 + fi + ls -lar /__e/node20 && + sudo apt-get install -y curl && + curl -Lo /tmp/node.tar.gz https://unofficial-builds.nodejs.org/download/release/v20.17.0/node-v20.17.0-linux-x64-glibc-217.tar.gz && + cd /__e/node20 && + tar -x --strip-components=1 -f /tmp/node.tar.gz && + ls -lar /__e/node20/bin/ + - name: Chcekout uses: actions/checkout@v3.0.2 From 17dfe94d7753d5a94bc9a2db39889a3818c17fd9 Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Tue, 23 Jul 2024 17:30:52 +0900 Subject: [PATCH 2/4] [jsk_data] Support download_data with colcon --- jsk_data/src/jsk_data/download_data.py | 20 +++++++++++++++++++- parallel_util/COLCON_IGNORE | 0 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 parallel_util/COLCON_IGNORE diff --git a/jsk_data/src/jsk_data/download_data.py b/jsk_data/src/jsk_data/download_data.py index e3dc4f211..9c6f81904 100644 --- a/jsk_data/src/jsk_data/download_data.py +++ b/jsk_data/src/jsk_data/download_data.py @@ -150,6 +150,21 @@ def _get_package_source_path(pkg_name): return pkg_path +def _get_colcon_package_share_path(pkg_name): + """ + Return package share path when colcon build. + NOTE: The install/share or install/$pkg_name/share/$pkg_name directories is not created + until colcon build finished. So this functions returns the path whether the directory + is exists or not. + """ + current_colcon_prefix_path = os.getenv("COLCON_PREFIX_PATH").split(":")[0] + if os.path.exists(os.path.join(current_colcon_prefix_path, "share")): # if merge install + share_path = os.path.join(current_colcon_prefix_path, "share", pkg_name) + else: # if default install + share_path = os.path.join(current_colcon_prefix_path, pkg_name, "share", pkg_name) + return share_path + + def download_data(pkg_name, path, url, md5, download_client=None, extract=False, compressed_bags=None, quiet=True, chmod=True, n_times=2): @@ -172,7 +187,10 @@ def download_data(pkg_name, path, url, md5, download_client=None, if compressed_bags is None: compressed_bags = [] if not osp.isabs(path): - pkg_path = _get_package_source_path(pkg_name) + if os.getenv("COLCON_PREFIX_PATH"): + pkg_path = _get_colcon_package_share_path(pkg_name) + else: + pkg_path = _get_package_source_path(pkg_name) if not pkg_path: print('\033[31mPackage [%s] is not found in current workspace. Skipping download\033[0m' % pkg_name, file=sys.stderr) diff --git a/parallel_util/COLCON_IGNORE b/parallel_util/COLCON_IGNORE new file mode 100644 index 000000000..e69de29bb From 7f4a37ae48fd58ddfac131249e14f7396193b135 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 9 Dec 2024 15:35:29 +0900 Subject: [PATCH 3/4] .github/forkflows/config.yml: add ROS-O test, see https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions for how to setup --- .github/workflows/config.yml | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index e1872ed7b..b14d66d5c 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -190,3 +190,61 @@ jobs: source ~/ws_depend/devel_isolated/setup.bash catkin_make_isolated ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }} shell: bash + + # 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 + 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: 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 }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }} + shell: bash From ec4ebaa38e4a9a63bbc8a5a451402fccc63e775c Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 9 Dec 2024 17:49:16 +0900 Subject: [PATCH 4/4] ROS_DISTRO: Ubuntu uses 'Debian' and ROS-O uses 'debian' --- jsk_rosbag_tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsk_rosbag_tools/CMakeLists.txt b/jsk_rosbag_tools/CMakeLists.txt index 75647f879..4fcdc770c 100644 --- a/jsk_rosbag_tools/CMakeLists.txt +++ b/jsk_rosbag_tools/CMakeLists.txt @@ -18,7 +18,7 @@ catkin_package( CATKIN_DEPENDS ) -if($ENV{ROS_DISTRO} STREQUAL "noetic") +if(("$ENV{ROS_DISTRO}" STREQUAL "noetic") OR ("$ENV{ROS_DISTRO}" STREQUAL "Debian") OR ("$ENV{ROS_DISTRO}" STREQUAL "debian")) catkin_generate_virtualenv( INPUT_REQUIREMENTS requirements.in PYTHON_INTERPRETER python3