-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(astyle): use astyle-check instead of system one
Since Ubuntu 24.4, astyle package does not accept the same options. Signed-off-by: Frederic Pillon <[email protected]>
- Loading branch information
Showing
1 changed file
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |