Skip to content

Commit

Permalink
ci(astyle): use astyle-check instead of system one
Browse files Browse the repository at this point in the history
Since Ubuntu 24.4, astyle package does not accept
the same options.

Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Jan 17, 2025
1 parent b296d8d commit 0e44165
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/check-astyle.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
name: Check code formatting with astyle

on:
push:
branches:
- main
paths-ignore:
- '*'
- '**.md'
- '**.txt'
pull_request:
paths-ignore:
- '*'
- '**.md'
- '**.txt'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check:
name: Check for astyle errors
astyle_check:
runs-on: ubuntu-latest

name: Check for astyle errors
steps:
- run: sudo apt install astyle
- uses: actions/checkout@v3
- run: astyle --project=.astylerc --recursive '*.c' '*.h'
# If anything changed, this will fail and show the needed changes
- run: git diff --exit-code
# First of all, clone the repo using the checkout action.
- name: Checkout
uses: actions/checkout@main

- name: Astyle check
id: Astyle
uses: stm32duino/actions/astyle-check@main

# Use the output from the `Astyle` step
- name: Astyle Errors
if: failure()
run: |
cat ${{ steps.Astyle.outputs.astyle-result }}
exit 1

0 comments on commit 0e44165

Please sign in to comment.