Skip to content

Commit

Permalink
use a separate workflow to check code formatting
Browse files Browse the repository at this point in the history
also fix typo in branch name (v1.x, not 1.x)
  • Loading branch information
2bndy5 committed Feb 17, 2024
1 parent fd38f48 commit e79e133
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 34 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/build_arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@ name: Arduino CLI build

on:
pull_request:
branches: [master, 1.x]
branches: [master, v1.x]
types: [opened, reopened]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"

push:
branches: [master, 1.x]
branches: [master, v1.x]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"

jobs:
check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
with:
ignore: '!examples|'
extensions: ino

build:
needs: check_formatting
uses: nRF24/.github/.github/workflows/build_arduino.yaml@main
with:
sketch-paths: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Linux build

on:
pull_request:
branches: [master, 1.x]
branches: [master, v1.x]
types: [opened, reopened]
paths:
- "*.h"
Expand All @@ -16,7 +16,7 @@ on:
- "**pyRF24Network/*.cpp"
- ".github/workflows/linux_build.yml"
push:
branches: [master, 1.x]
branches: [master, v1.x]
paths:
- "*.h"
- "*.cpp"
Expand All @@ -32,13 +32,7 @@ on:
types: [created]

jobs:
check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
with:
ignore: 'examples|examples_pico'

using_cmake:
needs: check_formatting
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
with:
rf24network-ref: ${{ github.sha }}
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/build_platformIO.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: PlatformIO build

on:
pull_request:
branches: [master, 1.x]
branches: [master, v1.x]
types: [opened, reopened]
paths:
- ".github/workflows/build_platformIO.yml"
- "library.json"
- "examples/**"
- "!examples/*.zip"
push:
branches: [master, 1.x]
branches: [master, v1.x]
paths:
- ".github/workflows/build_platformIO.yml"
- "library.json"
Expand All @@ -26,13 +26,8 @@ jobs:
with:
deploy-release: ${{ github.event_name == 'release' }}

check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
with:
extensions: ino

build:
needs: [check_formatting, validate_lib_json]
needs: [validate_lib_json]
uses: nRF24/.github/.github/workflows/build_platformio.yaml@main
with:
example-path: ${{ matrix.example }}
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/build_rp2xxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pico SDK build

on:
push:
branches: [master, 1.x]
branches: [master, v1.x]
paths:
- ".github/workflows/build_rp2xxx.yml"
- "*.h"
Expand All @@ -11,7 +11,7 @@ on:
- "cmake/"
- "examples_pico/*"
pull_request:
branches: [master, 1.x]
branches: [master, v1.x]
types: [opened, reopened]
paths:
- ".github/workflows/build_rp2xxx.yml"
Expand All @@ -22,13 +22,8 @@ on:
- "examples_pico/*"

jobs:
check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
with:
ignore: '!examples_pico|'

build:
needs: check_formatting
uses: nRF24/.github/.github/workflows/build_pico_sdk.yaml@main
with:
board-id: ${{ matrix.board }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: check code formatting

on:
push:
branches: [master, v1.x]
pull_request:
branches: [master, v1.x]

jobs:
check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
with:
extensions: ino,c,cpp,h
4 changes: 2 additions & 2 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build Docs

on:
pull_request:
branches: [master, 1.x]
branches: [master, v1.x]
types: [opened, reopened]
paths:
- "*.h"
Expand All @@ -14,7 +14,7 @@ on:
- "Doxyfile"
- "library.properties" # get lib version from here
push:
branches: [master, 1.x]
branches: [master, v1.x]
paths:
- "*.h"
- "docs/**"
Expand Down

0 comments on commit e79e133

Please sign in to comment.