From a4dc4f5e878f51262a6fe1f4a62e0319a9979fbe Mon Sep 17 00:00:00 2001 From: Roland Arsenault Date: Wed, 28 Feb 2024 09:55:07 -0500 Subject: [PATCH 1/2] Update ROS2 CI --- .github/workflows/ros2.yml | 51 ++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ros2.yml b/.github/workflows/ros2.yml index 80a9df17..cb62866f 100644 --- a/.github/workflows/ros2.yml +++ b/.github/workflows/ros2.yml @@ -1,28 +1,37 @@ name: ROS2 CI -on: + +on: # this determines when this workflow is run push: + branches: + - ros2 pull_request: - schedule: - - cron: "0 0 * * *" + workflow_dispatch: # allow manually starting this workflow + jobs: industrial_ci: - strategy: - matrix: - env: - - ROS_DISTRO: foxy - ROS_REPO: testing - CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Debug' - - ROS_DISTRO: foxy - ROS_REPO: testing - CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Release' - - ROS_DISTRO: galactic - ROS_REPO: testing - CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Debug' - - ROS_DISTRO: galactic - ROS_REPO: testing - CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Release' + name: ROS ${{ matrix.ROS_DISTRO }} (${{ matrix.ROS_REPO }}) runs-on: ubuntu-latest + strategy: + # fail-fast: false # uncomment if failing jobs should not cancel the others immediately + matrix: # matrix is the product of entries + ROS_DISTRO: [humble, iron, rolling] + ROS_REPO: [testing, main] + env: + CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci) steps: - - uses: actions/checkout@v1 - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} + - uses: actions/checkout@v3 # clone target repository + - uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run + with: + path: ${{ env.CCACHE_DIR }} + # This configuration will always create a new ccache cache starting off from the previous one (if any). + # In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO + # and might need some fine-tuning to match the use case + key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}} + restore-keys: | + ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}- + - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci + env: # either pass all entries explicitly + ROS_DISTRO: ${{ matrix.ROS_DISTRO }} + ROS_REPO: ${{ matrix.ROS_REPO }} + # with: # or pass the full matrix as config + # config: ${{toJSON(matrix)}} \ No newline at end of file From e976bce2af8cefd533d63b36502ef9c08b10c670 Mon Sep 17 00:00:00 2001 From: Roland Arsenault Date: Thu, 29 Feb 2024 08:21:45 -0500 Subject: [PATCH 2/2] Clean up per PR feedback --- .github/workflows/ros2.yml | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ros2.yml b/.github/workflows/ros2.yml index cb62866f..2119c389 100644 --- a/.github/workflows/ros2.yml +++ b/.github/workflows/ros2.yml @@ -1,37 +1,24 @@ name: ROS2 CI - -on: # this determines when this workflow is run +on: push: branches: - ros2 pull_request: - workflow_dispatch: # allow manually starting this workflow - + schedule: + - cron: "0 0 * * *" + workflow_dispatch: jobs: industrial_ci: - name: ROS ${{ matrix.ROS_DISTRO }} (${{ matrix.ROS_REPO }}) - runs-on: ubuntu-latest strategy: - # fail-fast: false # uncomment if failing jobs should not cancel the others immediately - matrix: # matrix is the product of entries + matrix: ROS_DISTRO: [humble, iron, rolling] ROS_REPO: [testing, main] - env: - CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci) + CMAKE_ARGS: ['-DCMAKE_BUILD_TYPE=Debug', '-DCMAKE_BUILD_TYPE=Release'] + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # clone target repository - - uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run - with: - path: ${{ env.CCACHE_DIR }} - # This configuration will always create a new ccache cache starting off from the previous one (if any). - # In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO - # and might need some fine-tuning to match the use case - key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}} - restore-keys: | - ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}- - - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci - env: # either pass all entries explicitly + - uses: actions/checkout@v3 + - uses: 'ros-industrial/industrial_ci@master' + env: ROS_DISTRO: ${{ matrix.ROS_DISTRO }} - ROS_REPO: ${{ matrix.ROS_REPO }} - # with: # or pass the full matrix as config - # config: ${{toJSON(matrix)}} \ No newline at end of file + ROS_REP: ${{ matrix.ROS_REPO }} + CMAKE_ARGS: ${{ matrix.CMAKE_ARGS }}