Skip to content

Commit

Permalink
CI: Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Aug 29, 2024
1 parent 57e957f commit 07ac7fc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 37 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,9 @@ jobs:
strategy:
matrix:
env:
- ROS_DISTRO: foxy
ROS_REPO: main
- ROS_DISTRO: foxy
ROS_REPO: testing
- ROS_DISTRO: galactic
ROS_REPO: main
- ROS_DISTRO: galactic
ROS_REPO: testing
- ROS_DISTRO: humble
ROS_REPO: main
- ROS_DISTRO: humble
ROS_REPO: testing
- ROS_DISTRO: rolling
ROS_REPO: main
- ROS_DISTRO: rolling
ROS_REPO: testing
- {ROS_DISTRO: rolling, ROS_REPO: main}
- {ROS_DISTRO: rolling, ROS_REPO: testing}
- {ROS_DISTRO: humble, ROS_REPO: main}
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
Expand All @@ -39,30 +26,32 @@ jobs:
name: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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@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
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- uses: actions/checkout@v4
- name: Install clang-format-14
run: sudo apt-get install clang-format-14
- uses: pre-commit/[email protected]
20 changes: 12 additions & 8 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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, humble, 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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,13 +38,13 @@ repos:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-10
entry: clang-format-14
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.8.0
hooks:
- id: black

Expand Down

0 comments on commit 07ac7fc

Please sign in to comment.