From b7193ad9e8c0f8e1217ab45a70c091ada59c0aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 28 Dec 2023 20:23:30 +0100 Subject: [PATCH] Fix CI (#325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix CI Signed-off-by: Alejandro Hernández Cordero --------- Signed-off-by: Alejandro Hernández Cordero --- .github/workflows/bazelized.yml | 2 +- .github/workflows/bazelized_drake_ros.yml | 2 +- .github/workflows/drake_model_interop.yml | 4 ++-- .github/workflows/main.yml | 10 +++++----- drake_ros/drake.bzl | 6 +++--- .../examples/hydroelastic/CMakeLists.txt | 1 + .../examples/rs_flip_flop/rs_flip_flop.cpp | 4 +++- ros2_example_bazel_installed/setup/install_prereqs.sh | 6 +++--- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/bazelized.yml b/.github/workflows/bazelized.yml index 8f037539..312610b0 100644 --- a/.github/workflows/bazelized.yml +++ b/.github/workflows/bazelized.yml @@ -20,7 +20,7 @@ jobs: # See https://stackoverflow.com/a/73613377/7829525 options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Caching. # See comments in drake-blender for more details: diff --git a/.github/workflows/bazelized_drake_ros.yml b/.github/workflows/bazelized_drake_ros.yml index 92a3cdb1..038aa9b6 100755 --- a/.github/workflows/bazelized_drake_ros.yml +++ b/.github/workflows/bazelized_drake_ros.yml @@ -15,7 +15,7 @@ jobs: if: "! contains(github.event.pull_request.labels.*.name, 'status: defer ci')" runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Free up space run: .github/runner_free_space.sh diff --git a/.github/workflows/drake_model_interop.yml b/.github/workflows/drake_model_interop.yml index f048c596..41fe55a1 100644 --- a/.github/workflows/drake_model_interop.yml +++ b/.github/workflows/drake_model_interop.yml @@ -22,8 +22,8 @@ jobs: container: image: ros:noetic-ros-base-focal steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v3 with: path: "/home/runner/.cache/model-interop" key: model_interop diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f5a39a8..311efae5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,17 +25,17 @@ jobs: env: PYTHONPATH: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Simplify apt upgrades run: $GITHUB_WORKSPACE/.github/simplify_apt_and_upgrades.sh - - uses: ros-tooling/setup-ros@v0.4 + - uses: ros-tooling/setup-ros@v0.7 with: required-ros-distributions: ${{matrix.ros_distro}} use-ros2-testing: "true" - name: Cope with Python 2 pollution run: apt-get update && apt-get install -y python-is-python3 - name: Build and test all packages - uses: ros-tooling/action-ros-ci@v0.2 + uses: ros-tooling/action-ros-ci@v0.3 with: target-ros2-distro: ${{matrix.ros_distro}} test_against_archive: @@ -54,10 +54,10 @@ jobs: env: PYTHONPATH: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Simplify apt upgrades run: $GITHUB_WORKSPACE/.github/simplify_apt_and_upgrades.sh - - uses: ros-tooling/setup-ros@v0.4 + - uses: ros-tooling/setup-ros@v0.7 - name: Install dependencies to build ROS packages run: | sudo mkdir -p /opt/ros/${{matrix.ros_distro}} diff --git a/drake_ros/drake.bzl b/drake_ros/drake.bzl index 9fd31c27..171aaaa7 100644 --- a/drake_ros/drake.bzl +++ b/drake_ros/drake.bzl @@ -1,5 +1,5 @@ DRAKE_SUGGESTED_VERSION = struct( - url = "https://github.com/RobotLocomotion/drake/archive/refs/tags/v1.23.0.tar.gz", # noqa - sha256 = "2e64bca9d5fe942170617d8109ec7ffe5df095d821743c9a619d38599229d03f", # noqa, - strip_prefix = "drake-1.23.0", + url = "https://github.com/RobotLocomotion/drake/archive/refs/tags/v1.24.0.tar.gz", # noqa + sha256 = "35874238af2c0305525a6f32c28692e3fdbed0581055b0b491669f7534cf6cae", # noqa, + strip_prefix = "drake-1.24.0", ) diff --git a/drake_ros_examples/examples/hydroelastic/CMakeLists.txt b/drake_ros_examples/examples/hydroelastic/CMakeLists.txt index db27452e..f1ce9f9f 100644 --- a/drake_ros_examples/examples/hydroelastic/CMakeLists.txt +++ b/drake_ros_examples/examples/hydroelastic/CMakeLists.txt @@ -5,6 +5,7 @@ target_link_libraries(hydroelastic drake::drake drake_ros::drake_ros_viz gflags + ament_index_cpp::ament_index_cpp ) install( TARGETS diff --git a/drake_ros_examples/examples/rs_flip_flop/rs_flip_flop.cpp b/drake_ros_examples/examples/rs_flip_flop/rs_flip_flop.cpp index a894e4c0..445cdd2a 100644 --- a/drake_ros_examples/examples/rs_flip_flop/rs_flip_flop.cpp +++ b/drake_ros_examples/examples/rs_flip_flop/rs_flip_flop.cpp @@ -58,7 +58,8 @@ class Memory : public drake::systems::LeafSystem { {all_state_ticket()}); DeclarePerStepEvent(drake::systems::UnrestrictedUpdateEvent( - [this](const drake::systems::Context& context, + [this](const drake::systems::System&, + const drake::systems::Context& context, const drake::systems::UnrestrictedUpdateEvent&, drake::systems::State* state) { // Copy input value to state @@ -66,6 +67,7 @@ class Memory : public drake::systems::LeafSystem { state->get_mutable_abstract_state(); abstract_state.get_mutable_value(0).SetFrom( get_input_port().Eval(context)); + return drake::systems::EventStatus::Succeeded(); })); } diff --git a/ros2_example_bazel_installed/setup/install_prereqs.sh b/ros2_example_bazel_installed/setup/install_prereqs.sh index 08a1a9e2..2ab1b9d3 100755 --- a/ros2_example_bazel_installed/setup/install_prereqs.sh +++ b/ros2_example_bazel_installed/setup/install_prereqs.sh @@ -75,10 +75,10 @@ if [[ -z "${ROS2_DISTRO_PREFIX:-}" ]]; then apt install software-properties-common add-apt-repository universe - apt update && apt install curl -y - curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg + # apt update && apt install curl -y + # curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | apt-key --keyring /usr/share/keyrings/ros-archive-keyring.gpg add - - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null + # echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null apt update