Skip to content

Commit

Permalink
[CI] Renew workflows (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Mar 4, 2024
1 parent aa46047 commit 633d12a
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 160 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/build-humble.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/build-rolling.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/ci-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Pre-Commit

on:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
pre-commit:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling, iron]
with:
ros_distro: ${{ matrix.ROS_DISTRO }}
os_name: ubuntu-22.04
22 changes: 0 additions & 22 deletions .github/workflows/format.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/humble-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Humble Binary Build
# author: Denis Štogl <[email protected]>
# description: 'Build & test all dependencies from released (binary) packages.'

on:
workflow_dispatch:
pull_request:
branches:
- humble
push:
branches:
- humble
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '28 6 * * *'

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]
ROS_REPO: [main, testing]
with:
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
ref_for_scheduled_build: humble
18 changes: 18 additions & 0 deletions .github/workflows/humble-ci-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Humble Pre-Commit

on:
workflow_dispatch:
pull_request:
branches:
- humble

jobs:
pre-commit:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble]
with:
ros_distro: ${{ matrix.ROS_DISTRO }}
os_name: ubuntu-22.04
10 changes: 10 additions & 0 deletions .github/workflows/reviewer_lottery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Reviewer lottery
# pull_request_target takes the same events as pull_request,
# but it runs on the base branch instead of the head branch.
on:
pull_request_target:
types: [opened, ready_for_review, reopened]

jobs:
assign_reviewers:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-reviewer-lottery.yml@master
28 changes: 28 additions & 0 deletions .github/workflows/rolling-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Rolling Binary Build
# author: Denis Štogl <[email protected]>
# description: 'Build & test all dependencies from released (binary) packages.'

on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '28 6 * * *'

jobs:
binary:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling, iron]
ROS_REPO: [main, testing]
with:
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
ref_for_scheduled_build: master
21 changes: 0 additions & 21 deletions .github/workflows/ros-lint.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/update-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Auto Update pre-commit
# Update pre-commit config and create PR if changes are detected
# author: Christoph Fröhlich <[email protected]>

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight

jobs:
auto_update_and_create_pr:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-update-pre-commit.yml@master
69 changes: 62 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -30,22 +30,68 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude_types: [rst]
- id: fix-byte-order-marker


# Python hooks
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py36-plus]

# PyDocStyle
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]

- repo: https://github.com/psf/black
rev: 20.8b1
rev: 24.2.0
hooks:
- id: black
args: ["--line-length=99"]

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args: ["--extend-ignore=E501"]

# CPP hooks
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
args: ['-fallback-style=none', '-i']

- repo: local
hooks:
- id: ament_cppcheck
name: ament_cppcheck
description: Static code analysis of C/C++ files.
entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck
language: system
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$

- repo: local
hooks:
- id: ament_cpplint
name: ament_cpplint
description: Static code analysis of C/C++ files.
entry: ament_cpplint
language: system
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
args: ["--linelength=100", "--filter=-whitespace/newline"]

# Cmake hooks
- repo: local
hooks:
- id: ament_lint_cmake
name: ament_lint_cmake
description: Check format of CMakeLists.txt files.
stages: [commit]
entry: ament_lint_cmake
language: system
files: CMakeLists\.txt$
Expand All @@ -56,7 +102,6 @@ repos:
- id: ament_copyright
name: ament_copyright
description: Check if copyright notice is available in all files.
stages: [commit]
entry: ament_copyright
language: system

Expand All @@ -69,7 +114,7 @@ repos:
exclude: CHANGELOG\.rst$

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.8.0
rev: v1.10.0
hooks:
- id: rst-backticks
exclude: CHANGELOG\.rst$
Expand All @@ -79,8 +124,18 @@ repos:
# Spellcheck in comments and docs
# skipping of *.svg files is not working...
- repo: https://github.com/codespell-project/codespell
rev: v2.0.0
rev: v2.2.6
hooks:
- id: codespell
args: ['--write-changes']
exclude: \.(svg|pyc)$
exclude: CHANGELOG\.rst|\.(svg|pyc)$

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-workflows
args: ["--verbose"]
- id: check-github-actions
args: ["--verbose"]
- id: check-dependabot
args: ["--verbose"]

0 comments on commit 633d12a

Please sign in to comment.