From 1ab8eefdd57aaf3e81a50e2a9b543ac5630d30d4 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Sat, 7 Mar 2026 15:37:58 +0100 Subject: [PATCH] CI: Run dint job on all files on deviceinfo_schema.toml change Similar to kconfigcheck.toml, let's run the dint job on all deviceinfo files when the spec itself is changed. This allows to catch possible new warnings and errors early and fix them. Part-of: --- .ci/lib/deviceinfo_linting.py | 13 ++++++++++--- .gitlab-ci.yml | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.ci/lib/deviceinfo_linting.py b/.ci/lib/deviceinfo_linting.py index 25f069cd9..2b51b5522 100755 --- a/.ci/lib/deviceinfo_linting.py +++ b/.ci/lib/deviceinfo_linting.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later import common +import glob import os.path import subprocess import sys @@ -11,9 +12,15 @@ if __name__ == "__main__": if common.commit_message_has_string("[ci:skip-dint]"): print("WARNING: not linting deviceinfo files ([ci:skip-dint])") exit(0) - # only lint deviceinfo files in the devices repo - deviceinfo_files = {file for file in common.get_changed_files() - if os.path.basename(file) == "deviceinfo" and file.startswith("device/")} + + if "deviceinfo_schema.toml" in common.get_changed_files(): + print("deviceinfo_schema.toml changed -> checking all deviceinfo files") + pmaports_dir = common.get_pmaports_dir() + deviceinfo_files = set(glob.glob(pmaports_dir + "/device/*/*/deviceinfo")) + else: + # only lint deviceinfo files in the devices repo + deviceinfo_files = {file for file in common.get_changed_files() + if os.path.basename(file) == "deviceinfo" and file.startswith("device/")} try: subprocess.run(["dint", "check", *deviceinfo_files], text=True, check=True) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 299fb0c74..aa42d4f3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -128,6 +128,7 @@ dint: - .ci/**/* - .gitlab-ci.yml - device/*/device-*/deviceinfo + - deviceinfo_schema.toml script: - .ci/lib/gitlab_prepare_ci.sh - .ci/dint.sh