From 1dc22c0fbcfcea5c1b7ab4e3c398261d27ae59b8 Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Wed, 17 Jan 2024 10:00:01 -0700 Subject: [PATCH] Use rosdep to install dependencies in ROS workspaces Signed-off-by: Ryan Friedman --- .github/workflows/build_test.yml | 21 +++++++-------------- .github/workflows/check_style.yml | 21 ++++++++++++++------- package.xml | 1 + 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index f3671bf..893bbf6 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,26 +17,19 @@ jobs: - {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'} container: ${{ matrix.config.container }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: - token: ${{ secrets.ACCESS_TOKEN }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Dependencies - working-directory: + path: src/grid_map_geo + - name: Install Dependencies with Rosdep run: | apt update - apt install -y python3-wstool libgdal-dev + rosdep update + source /opt/ros/${{matrix.config.rosdistro}}/setup.bash + rosdep install --from-paths src --ignore-src -y shell: bash - - name: Build Test + - name: Colcon Build (Release) working-directory: run: | - mkdir -p $HOME/ros2_ws/src; - cd $HOME/ros2_ws/src - ln -s $GITHUB_WORKSPACE - cd $HOME/ros2_ws - source /opt/ros/humble/setup.bash - rosdep update - rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}} colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map_geo shell: bash # - name: unit_tests diff --git a/.github/workflows/check_style.yml b/.github/workflows/check_style.yml index 2137071..77fdd69 100644 --- a/.github/workflows/check_style.yml +++ b/.github/workflows/check_style.yml @@ -14,14 +14,21 @@ jobs: strategy: fail-fast: false matrix: - container: - - 'osrf/ros:humble-desktop' - container: ${{ matrix.container }} + config: + - {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'} + container: ${{ matrix.config.container }} steps: - - uses: actions/checkout@v1 - - name: Install clang-format - run: apt update && apt install -y clang-format-14 + - uses: actions/checkout@v4 + with: + path: src/grid_map_geo + - name: Install Dependencies with Rosdep + run: | + apt update + rosdep update + source /opt/ros/${{matrix.config.rosdistro}}/setup.bash + rosdep install --from-paths src --ignore-src -y + shell: bash - name: Check Code format - working-directory: Tools + working-directory: src/grid_map_geo/Tools run: | ./check_code_format.sh .. diff --git a/package.xml b/package.xml index ac5463e..11c3a8e 100644 --- a/package.xml +++ b/package.xml @@ -21,6 +21,7 @@ yaml_cpp_vendor ros2launch grid_map_rviz_plugin + clang-format ament_cmake