From 2ff4a5e58be1bdecde373005b400bbb712d3b98f Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Mon, 12 Aug 2024 11:39:48 +0200 Subject: [PATCH] CI: Update actions --- .github/workflows/build_and_test.yaml | 18 ++++++++---------- .github/workflows/format.yaml | 9 ++++----- .github/workflows/prerelease.yaml | 20 ++++++++++++-------- .pre-commit-config.yaml | 4 ++-- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 9d1a50d..e1cf59d 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -15,17 +15,13 @@ jobs: strategy: matrix: env: - - ROS_DISTRO: foxy - ROS_REPO: main - - ROS_DISTRO: foxy - ROS_REPO: testing - ROS_DISTRO: rolling ROS_REPO: main - ROS_DISTRO: rolling ROS_REPO: testing - - ROS_DISTRO: galactic + - ROS_DISTRO: humble ROS_REPO: main - - ROS_DISTRO: galactic + - ROS_DISTRO: humble ROS_REPO: testing env: CCACHE_DIR: ${{ github.workspace }}/.ccache @@ -40,25 +36,27 @@ jobs: # 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@v2.1.5 + 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@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: test-results diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 4fcae08..52fc2fa 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -13,8 +13,7 @@ jobs: name: Format runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Install clang-format-10 - run: sudo apt-get install clang-format-10 - - uses: pre-commit/action@v2.0.0 + - uses: actions/checkout@v4 + - name: Install clang-format-14 + run: sudo apt-get install clang-format-14 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 8b86085..1433a9f 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -5,22 +5,26 @@ name: pre-release on: workflow_dispatch: + inputs: + ROS_DISTRO: + type: string + required: true + description: 'ROS distribution codename:' + default: rolling + +permissions: + contents: read # to fetch code (actions/checkout) jobs: default: - strategy: - fail-fast: false - matrix: - distro: [foxy, galactic, rolling] - env: - ROS_DISTRO: ${{ matrix.distro }} + ROS_DISTRO: ${{ inputs.ROS_DISTRO }} PRERELEASE: true BASEDIR: ${{ github.workspace }}/.work - name: "${{ matrix.distro }}" + name: "${{ inputs.ROS_DISTRO }}" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: industrial_ci uses: ros-industrial/industrial_ci@master diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc3f6c9..f0c13ad 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: v3.4.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -28,7 +28,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.8.0 hooks: - id: black