109ae27c40c826ea01dca6e3dc28c5aaa462422e
[openwrt/staging/blocktrron.git] /
1 From 6c110195b1f9b4e39676065d5973ecf603746862 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 8 Mar 2023 15:28:19 +0000
4 Subject: [PATCH] workflows: We all love checkpatch, so add it to the
5 CI workflows
6
7 This is currently running on defaults, so the --strict desired
8 for media drivers and similar won't be observed. That may be
9 possible to add later.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 .github/workflows/checkpatch.yml | 18 ++++++++++++++++++
14 .github/workflows/ci_checkpatch.conf | 4 ++++
15 2 files changed, 22 insertions(+)
16 create mode 100644 .github/workflows/checkpatch.yml
17 create mode 100644 .github/workflows/ci_checkpatch.conf
18
19 --- /dev/null
20 +++ b/.github/workflows/checkpatch.yml
21 @@ -0,0 +1,18 @@
22 +name: Advisory checkpatch review
23 +on: [pull_request]
24 +
25 +jobs:
26 + review:
27 + name: checkpatch review
28 + runs-on: ubuntu-latest
29 + steps:
30 + - name: 'Calculate PR commits + 1'
31 + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
32 + - uses: actions/checkout@v3
33 + with:
34 + ref: ${{ github.event.pull_request.head.sha }}
35 + fetch-depth: ${{ env.PR_FETCH_DEPTH }}
36 + - name: Copy checkpatch.conf
37 + run: cp ${{github.workspace}}/.github/workflows/ci_checkpatch.conf ${{github.workspace}}/.checkpatch.conf
38 + - name: Run checkpatch review
39 + uses: webispy/checkpatch-action@v9
40 --- /dev/null
41 +++ b/.github/workflows/ci_checkpatch.conf
42 @@ -0,0 +1,4 @@
43 +--no-tree
44 +--ignore FILE_PATH_CHANGES
45 +--ignore GIT_COMMIT_ID
46 +--ignore SPDX_LICENSE_TAG