Linux-Firmware Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: <linux-firmware@kernel.org>, Josh Boyer <jwboyer@kernel.org>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH 18/20] Add CI/CD with ci-fairy
Date: Tue, 15 Aug 2023 13:00:16 -0500	[thread overview]
Message-ID: <20230815180018.25554-19-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230815180018.25554-1-mario.limonciello@amd.com>

When run on a Freedesktop Gitlab isntance this will leverage
existing templates and run a pre-commit script.

This will make sure that all formatting changes match the expected
style.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 .codespell.cfg          |  4 ++++
 .gitignore              |  1 +
 .gitlab-ci.yml          | 22 ++++++++++++++++++++++
 .pre-commit-config.yaml | 33 +++++++++++++++++++++++++++++++++
 check_whence.py         |  4 ++++
 5 files changed, 64 insertions(+)
 create mode 100644 .codespell.cfg
 create mode 100644 .gitignore
 create mode 100644 .gitlab-ci.yml
 create mode 100644 .pre-commit-config.yaml

diff --git a/.codespell.cfg b/.codespell.cfg
new file mode 100644
index 00000000..5af7dce9
--- /dev/null
+++ b/.codespell.cfg
@@ -0,0 +1,4 @@
+[codespell]
+builtin = clear,informal,en-GB_to_en-US
+skip = .git,carl9170fw,
+ignore-words-list = fils
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..fcf54f43
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+debian/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..7cfdca38
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,22 @@
+.templates_sha: &templates_sha e9a461877f8c7f9fed9fff5491067ec3c3472559
+
+include:
+  - project: 'freedesktop/ci-templates'
+    ref: *templates_sha
+    file: '/templates/ci-fairy.yml'
+
+check-commits:
+  extends:
+    - .fdo.ci-fairy
+  script:
+    - ci-fairy check-commits --signed-off-by
+
+pre-commit:
+  extends:
+    - .fdo.ci-fairy
+  script:
+    - apk add python3-dev
+    - apk add gcc
+    - apk add musl-dev
+    - pip install pre-commit --ignore-installed distlib
+    - pre-commit run --all-files
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000..b77bb683
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,33 @@
+default_stages: [commit]
+repos:
+-   repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v4.0.1
+    hooks:
+    -   id: check-executables-have-shebangs
+    -   id: forbid-new-submodules
+    -   id: check-yaml
+    -   id: check-symlinks
+    -   id: destroyed-symlinks
+-   repo: https://github.com/codespell-project/codespell
+    rev: v2.1.0
+    hooks:
+    -   id: codespell
+        args: ['--config', './.codespell.cfg', '--write-changes']
+        types: [text]
+        exclude_types: ['c']
+-   repo: https://github.com/ambv/black
+    rev: 22.6.0
+    hooks:
+    - id: black
+-   repo: https://github.com/igorshubovych/markdownlint-cli
+    rev: v0.33.0
+    hooks:
+    - id: markdownlint
+      args: ['--fix']
+-   repo: local
+    hooks:
+    - id: check-whence
+      name: Check whence
+      files: 'WHENCE'
+      language: script
+      entry: ./check_whence.py
diff --git a/check_whence.py b/check_whence.py
index bf14aed6..3658e745 100755
--- a/check_whence.py
+++ b/check_whence.py
@@ -72,6 +72,10 @@ def main():
     links_list = list(list_links_list())
     known_files = set(name for name in whence_list if not name.endswith("/")) | set(
         [
+            ".gitignore",
+            ".codespell.cfg",
+            ".gitlab-ci.yml",
+            ".pre-commit-config.yaml",
             "check_whence.py",
             "configure",
             "Makefile",
-- 
2.25.1


  parent reply	other threads:[~2023-08-15 18:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15 17:59 [PATCH 00/20] Add preparations to be able to run in a CI/CD system Mario Limonciello
2023-08-15 17:59 ` [PATCH 01/20] ath11k: update typographical errors in the Notice.txt files Mario Limonciello
2023-08-15 18:00 ` [PATCH 02/20] ath10k: correct " Mario Limonciello
2023-08-15 18:00 ` [PATCH 03/20] i915: correct typographical errors caught by codespell Mario Limonciello
2023-08-15 18:00 ` [PATCH 04/20] adsp_sst: " Mario Limonciello
2023-08-15 18:00 ` [PATCH 05/20] agere: correct typographical errors in LICENSE " Mario Limonciello
2023-08-15 18:00 ` [PATCH 06/20] qca: correct typographical errors in NOTICE.txt " Mario Limonciello
2023-08-15 18:00 ` [PATCH 07/20] usbdux: correct typographical errors " Mario Limonciello
2023-08-15 18:00 ` [PATCH 08/20] dsp56k: correct typographical error " Mario Limonciello
2023-08-15 18:00 ` [PATCH 09/20] cxgb4: correct typographical errors " Mario Limonciello
2023-08-15 18:00 ` [PATCH 10/20] cavium_liquidio: fix " Mario Limonciello
2023-08-15 18:00 ` [PATCH 11/20] kaweth: correct " Mario Limonciello
2023-08-15 18:00 ` [PATCH 12/20] xc5000c: " Mario Limonciello
2023-08-15 18:00 ` [PATCH 13/20] qcom: " Mario Limonciello
2023-08-15 18:00 ` [PATCH 14/20] keyspan_pda: " Mario Limonciello
2023-08-15 18:00 ` [PATCH 15/20] carl9170fw: " Mario Limonciello
2023-08-15 18:00 ` [PATCH 16/20] WHENCE: " Mario Limonciello
2023-08-15 18:00 ` [PATCH 17/20] check_whence: reformat using python black Mario Limonciello
2023-08-15 18:00 ` Mario Limonciello [this message]
2023-08-15 18:00 ` [PATCH 19/20] Wire up pre-commit to `make check` Mario Limonciello
2023-08-15 18:00 ` [PATCH 20/20] Rewrite README in markdown Mario Limonciello
2023-08-25 17:22 ` [PATCH 00/20] Add preparations to be able to run in a CI/CD system Dmitry Baryshkov
2023-08-28 11:15   ` Josh Boyer
2023-08-30 15:51     ` Mario Limonciello

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=20230815180018.25554-19-mario.limonciello@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=jwboyer@kernel.org \
    --cc=linux-firmware@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox