Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org,
	Sergey Kaplun <skaplun@tarantool.org>,
	max.kokryashkin@gmail.com
Subject: [Tarantool-patches] [PATCH 4/4][v2] ci: enable checkpatch
Date: Mon, 17 Jul 2023 16:34:37 +0300	[thread overview]
Message-ID: <28d01b012c35749e8087ee21326e275c5bba6a21.1689600525.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1689600525.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@tarantool.org>

Patch enables running checkpatch [1] for checking patch on a pre-commit
stage.

1. https://github.com/tarantool/checkpatch
---
 .github/actions/checkpatch/action.yml | 11 +++++++++++
 .github/workflows/lint.yml            | 20 ++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 .github/actions/checkpatch/action.yml

diff --git a/.github/actions/checkpatch/action.yml b/.github/actions/checkpatch/action.yml
new file mode 100644
index 00000000..2336fb15
--- /dev/null
+++ b/.github/actions/checkpatch/action.yml
@@ -0,0 +1,11 @@
+name: Checkpatch
+description: Check patches against LuaJIT development guidelines
+runs:
+  using: composite
+  steps:
+    - uses: actions/checkout@v3
+      with:
+        repository: tarantool/checkpatch
+        path: 'checkpatch'
+    - run: apt install -y codespell
+      shell: bash
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 44338f6d..d86c5d54 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -53,3 +53,23 @@ jobs:
       - name: luacheck
         run: cmake --build . --target LuaJIT-luacheck
         working-directory: ${{ env.BUILDDIR }}
+
+  checkpatch:
+    runs-on: [self-hosted, lightweight, Linux, x86_64]
+
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          submodules: recursive
+      - name: checkpatch
+        uses: ./.github/actions/checkpatch
+      - name: environment
+        uses: ./.github/actions/setup
+      - name: make tarantool/master available
+        run: git checkout tarantool/master && git checkout -
+      - name: configure
+        run: cmake -S . -B ${{ env.BUILDDIR }}
+      - name: checkpatch
+        run: cmake --build . --target LuaJIT-checkpatch
+        working-directory: ${{ env.BUILDDIR }}
-- 
2.34.1


  parent reply	other threads:[~2023-07-17 13:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 13:34 [Tarantool-patches] [PATCH 0/4][v2] Fix typos and " Sergey Bronnikov via Tarantool-patches
2023-07-17 13:34 ` [Tarantool-patches] [PATCH 1/4][v2] ci: fix a step name Sergey Bronnikov via Tarantool-patches
2023-07-17 15:43   ` Maxim Kokryashkin via Tarantool-patches
2023-07-17 13:34 ` [Tarantool-patches] [PATCH 2/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
2023-07-17 15:48   ` Maxim Kokryashkin via Tarantool-patches
2023-07-17 13:34 ` [Tarantool-patches] [PATCH 3/4][v2] cmake: introduce 'check' and 'LuaJIT-checkpatch' targets Sergey Bronnikov via Tarantool-patches
2023-07-17 16:10   ` Maxim Kokryashkin via Tarantool-patches
2023-07-20 18:07     ` Sergey Bronnikov via Tarantool-patches
2023-07-20 21:13       ` Maxim Kokryashkin via Tarantool-patches
2023-07-17 13:34 ` Sergey Bronnikov via Tarantool-patches [this message]
2023-07-17 18:48   ` [Tarantool-patches] [PATCH 4/4][v2] ci: enable checkpatch Maxim Kokryashkin via Tarantool-patches
2023-07-20 18:14     ` Sergey Bronnikov via Tarantool-patches
2023-07-20 21:14       ` Maxim Kokryashkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28d01b012c35749e8087ee21326e275c5bba6a21.1689600525.git.sergeyb@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=estetus@gmail.com \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 4/4][v2] ci: enable checkpatch' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox