From 36a51f52f9d9c184ed61de5b757c2b3cb7dcb054 Mon Sep 17 00:00:00 2001 From: Carlos Mastalli Date: Mon, 31 Jul 2023 22:45:18 +0100 Subject: [PATCH] [ci] Created ROS2 jobs --- .github/workflows/ros_ci.yaml | 37 +++++++++++++++++++ ...strial_ci_action.yml => ros_ci_clang.yaml} | 23 +++--------- 2 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ros_ci.yaml rename .github/workflows/{industrial_ci_action.yml => ros_ci_clang.yaml} (65%) diff --git a/.github/workflows/ros_ci.yaml b/.github/workflows/ros_ci.yaml new file mode 100644 index 0000000000..b45477f093 --- /dev/null +++ b/.github/workflows/ros_ci.yaml @@ -0,0 +1,37 @@ +name: ROS + +# This determines when this workflow is run +on: [push, pull_request] + +jobs: + CI: + strategy: + matrix: + env: + # - {ROS_DISTRO: noetic, PRERELEASE: true} + - {ROS_DISTRO: humble} + - {name: "CI (humble, multi-threading)", ROS_DISTRO: humble, ADDITIONAL_DEBS: "libomp-dev", CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"} + - {name: "CI (humble, Debug)", ROS_DISTRO: noetic, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"} + - {ROS_DISTRO: rolling} + - {name: "CI (rolling, multi-threading)", ROS_DISTRO: rolling, ADDITIONAL_DEBS: "libomp-dev", CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"} + - {name: "CI (rolling, Debug)", ROS_DISTRO: rolling, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"} + env: + CCACHE_DIR: /github/home/.ccache # Enable ccache + UPSTREAM_WORKSPACE: dependencies.rosinstall # to build example-robot-data from source as it's not released via the ROS buildfarm + CTEST_OUTPUT_ON_FAILURE: 1 + BUILDER: colcon + # This by-passes issues on importing example_robot_data module when running examples and unit tests. + # It seems target_ws is unable to properly overlay upstream_ws. + AFTER_SETUP_UPSTREAM_WORKSPACE: 'pip install example-robot-data' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + # This step will fetch/store the directory used by ccache before/after the ci run + - uses: actions/cache@v3 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} + - uses: 'ros-industrial/industrial_ci@master' + env: ${{ matrix.env }} diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/ros_ci_clang.yaml similarity index 65% rename from .github/workflows/industrial_ci_action.yml rename to .github/workflows/ros_ci_clang.yaml index 76dae4d56c..73c423454b 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/ros_ci_clang.yaml @@ -1,7 +1,4 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: ROS-CI +name: ROS-CI-2 # This determines when this workflow is run on: [push, pull_request] # on all pushes and PRs @@ -11,20 +8,12 @@ jobs: strategy: matrix: env: - # Ubuntu 20.04, g++, Release - - {name: "Focal / g++ / Release", ROS_DISTRO: noetic} - # Ubuntu 20.04, clang, Release - - {name: "Focal / clang / Release", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++} - # Ubuntu 20.04, clang, Release, multi-threading - - {name: "Focal / clang / Release / Multi-threading", ROS_DISTRO: noetic, ADDITIONAL_DEBS: "clang libomp-dev", CC: clang, CXX: clang++, CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"} + - {name: "CI (noetic, g++, Release)", ROS_DISTRO: noetic} + - {name: "CI (noetic, clang, Release)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++} + - {name: "CI (noetic, clang, Release, multi-threading)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: "clang libomp-dev", CC: clang, CXX: clang++, CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"} + - {name: "CI (noetic, clang, Debug)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"} # Format check - #- {name: "Format check", ROS_DISTRO: noetic, CLANG_FORMAT_CHECK: file, CLANG_FORMAT_VERSION: "6.0", BEFORE_RUN_CLANG_FORMAT_CHECK: "wget https://raw.githubusercontent.com/Gepetto/linters/master/.clang-format-6.0 -O /tmp/clang_format_check/crocoddyl/.clang-format", ADDITIONAL_DEBS: wget} - ## Working configs for Debug mode. However, tests take too long in Debug mode (~1h on a laptop). - ## Hence, not active on GitHub Actions - # # Ubuntu 20.04, g++, Debug - # - {name: "Focal / g++ / Debug", ROS_DISTRO: noetic, CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Debug'} - # Ubuntu 20.04, clang, Debug - - {name: "Focal / clang / Debug", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"} + #- {name: "Format check", ROS_DISTRO: noetic, CLANG_FORMAT_CHECK: file, CLANG_FORMAT_VERSION: "6.0", BEFORE_RUN_CLANG_FORMAT_CHECK: "wget https://raw.githubusercontent.com/Gepetto/linters/master/.clang-format-6.0 -O /tmp/clang_format_check/crocoddyl/.clang-format", ADDITIONAL_DEBS: wget} name: ${{ matrix.env.name }} env: CCACHE_DIR: /github/home/.ccache # Enable ccache