From 22fe3bfa122821ff98871e4fff8bec4fa7b0df3e Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 29 Aug 2024 11:03:57 +0200 Subject: [PATCH 1/3] CI: Update actions --- .github/workflows/build_and_test.yaml | 16 ++++++++-------- .github/workflows/format.yaml | 5 ++--- .pre-commit-config.yaml | 4 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index cd2ae7a..884a879 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -17,8 +17,6 @@ jobs: env: - ROS_DISTRO: melodic ROS_REPO: main - - ROS_DISTRO: melodic - ROS_REPO: testing - ROS_DISTRO: noetic ROS_REPO: main CCOV: true @@ -39,36 +37,38 @@ jobs: name: "${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}${{ matrix.env.CCOV && ' + ccov' || ''}}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # The target directory cache doesn't include the source directory because # that comes from the checkout. See "prepare target_ws for cache" task below - name: cache target_ws if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v2.1.5 + uses: actions/cache@v4 with: + save-always: true path: ${{ env.BASEDIR }}/target_ws key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} restore-keys: | target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - name: cache ccache - uses: pat-s/always-upload-cache@v3 + uses: actions/cache@v4 with: + save-always: true path: ${{ env.CCACHE_DIR }} key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} restore-keys: | ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} ccache-${{ env.CACHE_PREFIX }} - name: industrial_ci - uses: 'ros-industrial/industrial_ci@master' + uses: ros-industrial/industrial_ci@master env: ${{ matrix.env }} - name: upload test artifacts (on failure) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: test-results path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml - name: upload codecov report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 if: ${{ matrix.env.CCOV }} with: files: ${{ env.BASEDIR }}/coverage.info diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 5f5b350..5de3ecb 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -13,8 +13,7 @@ jobs: name: Format runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v4.1.1 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v4 - name: Install clang-format-10 run: sudo apt-get install clang-format-10 - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1ef1cb..7ad3527 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -34,7 +34,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.8.0 hooks: - id: black From f6732c3f41f5ae59d1321fc3d3e64ffb9a4192f0 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 29 Aug 2024 12:07:24 +0200 Subject: [PATCH 2/3] Unify workflow name with ros2 branch --- .../{build_and_test.yaml => industrial_ci_action.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build_and_test.yaml => industrial_ci_action.yaml} (99%) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/industrial_ci_action.yaml similarity index 99% rename from .github/workflows/build_and_test.yaml rename to .github/workflows/industrial_ci_action.yaml index 884a879..ddfdc6b 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/industrial_ci_action.yaml @@ -1,7 +1,7 @@ # 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: Build And Test +name: BuildAndTest on: workflow_dispatch: From 2df81d0d5f5dbbf73829bb856667d7779bb5349e Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sun, 13 Oct 2024 23:24:28 +0200 Subject: [PATCH 3/3] CI: Return to custom cache action --- .github/workflows/industrial_ci_action.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yaml b/.github/workflows/industrial_ci_action.yaml index ddfdc6b..b412960 100644 --- a/.github/workflows/industrial_ci_action.yaml +++ b/.github/workflows/industrial_ci_action.yaml @@ -42,22 +42,24 @@ jobs: # that comes from the checkout. See "prepare target_ws for cache" task below - name: cache target_ws if: ${{ ! matrix.env.CCOV }} - uses: actions/cache@v4 + uses: rhaschke/cache@main with: - save-always: true path: ${{ env.BASEDIR }}/target_ws key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} restore-keys: | target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} + env: + GHA_CACHE_SAVE: always - name: cache ccache - uses: actions/cache@v4 + uses: rhaschke/cache@main with: - save-always: true path: ${{ env.CCACHE_DIR }} key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} restore-keys: | ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} ccache-${{ env.CACHE_PREFIX }} + env: + GHA_CACHE_SAVE: always - name: industrial_ci uses: ros-industrial/industrial_ci@master env: ${{ matrix.env }}