From 4b076378d90b98b144b2637a832f8d7b23b07267 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sat, 22 Nov 2025 20:21:36 +0000 Subject: [PATCH 1/2] Copy over CI from RSL repo --- .github/workflows/ci.yaml | 114 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..406af8f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,114 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + cmake: + name: cmake (${{ matrix.ros_distro }}, ${{ matrix.preset }}, ${{ matrix.compiler.name }}) + strategy: + fail-fast: false + matrix: + ros_distro: [humble, jazzy, kilted, rolling] + preset: [debug, release, asan, codecov] + compiler: + - { name: GCC } + - { name: Clang, flags: -DCMAKE_CXX_COMPILER=clang++ } + exclude: + - preset: codecov + compiler: { name: Clang } + - preset: codecov + ros_distro: humble + - preset: codecov + ros_distro: jazzy + - preset: codecov + ros_distro: kilted + runs-on: ubuntu-latest + container: ghcr.io/ros-controls/ros:${{ matrix.ros_distro }}-ubuntu + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-cmake-${{ matrix.ros_distro }}-${{ matrix.preset }}-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ccache-cmake-${{ matrix.ros_distro }}-${{ matrix.preset }}-${{ github.sha }} + ccache-cmake-${{ matrix.ros_distro }}-${{ matrix.preset }} + - name: Install system dependencies + run: | + sudo apt update + sudo apt install -y lld ccache + - name: Source ROS + run: | + . /opt/ros/${{ matrix.ros_distro }}/setup.sh + echo "$(env)" >> $GITHUB_ENV + - name: Install ROS dependencies + run: | + sudo apt update + rosdep update + rosdep install --from-paths . --ignore-src -r -y + - name: Install Clang + if: matrix.compiler.name == 'Clang' + run: sudo apt update && sudo apt install clang + - name: Configure + run: cmake --preset ${{ matrix.preset }} ${{ matrix.compiler.flags }} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_VERBOSE_MAKEFILE=ON + - name: Build + run: cmake --build build/${{ matrix.preset }} --target install + - name: Test + run: ctest --test-dir build/${{ matrix.preset }} --rerun-failed --output-on-failure + - name: Build Doxygen Site + run: cmake --build build/${{ matrix.preset }} --target docs + - name: Analyze + run: cmake --build build/${{ matrix.preset }} --target tidy + - name: Generate LCOV report + if: ${{ matrix.preset == 'codecov' }} + run: lcov -c -d . -o coverage.info --no-external --exclude "*/build/**" --ignore-errors mismatch + - uses: codecov/codecov-action@v3 + if: ${{ matrix.preset == 'codecov' }} + with: + files: ./coverage.info + name: codecov-umbrella + flags: ${{ matrix.ros_distro }} + + ros: + strategy: + fail-fast: false + matrix: + ros_distro: [humble, jazzy, kilted, rolling] + runs-on: ubuntu-latest + container: ghcr.io/ros-controls/ros:${{ matrix.ros_distro }}-ubuntu + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-ros-${{ matrix.ros_distro }}-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ccache-ros-${{ matrix.ros_distro }}-${{ github.sha }} + ccache-ros-${{ matrix.ros_distro }} + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y lld ccache + - uses: ros-tooling/action-ros-ci@0.4.5 + with: + package-name: rsl + target-ros2-distro: ${{ matrix.ros_distro }} + colcon-defaults: | + { + "build": { + "mixin": ["ccache", "lld"] + } + } From 1085dfc8ae1ed1254229a84356956c9d60659d68 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sat, 22 Nov 2025 20:25:00 +0000 Subject: [PATCH 2/2] Use that one of ros2-control instead --- .github/workflows/ci.yaml | 114 --------------------- .github/workflows/rolling-binary-build.yml | 40 ++++++++ 2 files changed, 40 insertions(+), 114 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/rolling-binary-build.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 406af8f..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,114 +0,0 @@ -name: CI - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - cmake: - name: cmake (${{ matrix.ros_distro }}, ${{ matrix.preset }}, ${{ matrix.compiler.name }}) - strategy: - fail-fast: false - matrix: - ros_distro: [humble, jazzy, kilted, rolling] - preset: [debug, release, asan, codecov] - compiler: - - { name: GCC } - - { name: Clang, flags: -DCMAKE_CXX_COMPILER=clang++ } - exclude: - - preset: codecov - compiler: { name: Clang } - - preset: codecov - ros_distro: humble - - preset: codecov - ros_distro: jazzy - - preset: codecov - ros_distro: kilted - runs-on: ubuntu-latest - container: ghcr.io/ros-controls/ros:${{ matrix.ros_distro }}-ubuntu - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - name: Cache ccache - uses: actions/cache@v4 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-cmake-${{ matrix.ros_distro }}-${{ matrix.preset }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-cmake-${{ matrix.ros_distro }}-${{ matrix.preset }}-${{ github.sha }} - ccache-cmake-${{ matrix.ros_distro }}-${{ matrix.preset }} - - name: Install system dependencies - run: | - sudo apt update - sudo apt install -y lld ccache - - name: Source ROS - run: | - . /opt/ros/${{ matrix.ros_distro }}/setup.sh - echo "$(env)" >> $GITHUB_ENV - - name: Install ROS dependencies - run: | - sudo apt update - rosdep update - rosdep install --from-paths . --ignore-src -r -y - - name: Install Clang - if: matrix.compiler.name == 'Clang' - run: sudo apt update && sudo apt install clang - - name: Configure - run: cmake --preset ${{ matrix.preset }} ${{ matrix.compiler.flags }} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_VERBOSE_MAKEFILE=ON - - name: Build - run: cmake --build build/${{ matrix.preset }} --target install - - name: Test - run: ctest --test-dir build/${{ matrix.preset }} --rerun-failed --output-on-failure - - name: Build Doxygen Site - run: cmake --build build/${{ matrix.preset }} --target docs - - name: Analyze - run: cmake --build build/${{ matrix.preset }} --target tidy - - name: Generate LCOV report - if: ${{ matrix.preset == 'codecov' }} - run: lcov -c -d . -o coverage.info --no-external --exclude "*/build/**" --ignore-errors mismatch - - uses: codecov/codecov-action@v3 - if: ${{ matrix.preset == 'codecov' }} - with: - files: ./coverage.info - name: codecov-umbrella - flags: ${{ matrix.ros_distro }} - - ros: - strategy: - fail-fast: false - matrix: - ros_distro: [humble, jazzy, kilted, rolling] - runs-on: ubuntu-latest - container: ghcr.io/ros-controls/ros:${{ matrix.ros_distro }}-ubuntu - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - name: Cache ccache - uses: actions/cache@v4 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-ros-${{ matrix.ros_distro }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-ros-${{ matrix.ros_distro }}-${{ github.sha }} - ccache-ros-${{ matrix.ros_distro }} - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y lld ccache - - uses: ros-tooling/action-ros-ci@0.4.5 - with: - package-name: rsl - target-ros2-distro: ${{ matrix.ros_distro }} - colcon-defaults: | - { - "build": { - "mixin": ["ccache", "lld"] - } - } diff --git a/.github/workflows/rolling-binary-build.yml b/.github/workflows/rolling-binary-build.yml new file mode 100644 index 0000000..a8112e1 --- /dev/null +++ b/.github/workflows/rolling-binary-build.yml @@ -0,0 +1,40 @@ +# 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: Rolling - Binary Build +on: + pull_request: + push: + branches: + - main + schedule: + # Run every day to detect flakiness and broken dependencies + - cron: '28 6 * * MON-FRI' + +concurrency: + # cancel previous runs of the same workflow, except for pushes on given branches branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + +jobs: + binary: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + fail-fast: false + matrix: + ROS_DISTRO: [humble, jazzy, kilted, rolling] + ROS_REPO: [main, testing] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + ref_for_scheduled_build: master + binary_clang: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + with: + ros_distro: rolling + ros_repo: testing + ref_for_scheduled_build: master + additional_debs: clang + c_compiler: clang + cxx_compiler: clang++ + not_test_build: true