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: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8139>
This commit is contained in:
Luca Weiss
2026-03-20 01:57:32 +00:00
parent acf264e262
commit 1ab8eefdd5
2 changed files with 11 additions and 3 deletions
+7
View File
@@ -3,6 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
import common
import glob
import os.path
import subprocess
import sys
@@ -11,6 +12,12 @@ if __name__ == "__main__":
if common.commit_message_has_string("[ci:skip-dint]"):
print("WARNING: not linting deviceinfo files ([ci:skip-dint])")
exit(0)
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/")}
+1
View File
@@ -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