Skip to content

Commit f394a80

Browse files
authored
Update completeness_check.yml
1 parent c2d8a7a commit f394a80

File tree

1 file changed

+47
-6
lines changed

1 file changed

+47
-6
lines changed

.github/workflows/completeness_check.yml

+47-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ jobs:
2626
echo "README.md is missing one or more required sections." && exit 1;
2727
fi
2828
29-
- name: Check for YouTube link in README
30-
run: |
31-
if ! grep -qE 'https://(www\.)?youtube\.com|youtu\.be' README.md; then
32-
echo "README.md is missing a link to a YouTube video." && exit 1;
33-
fi
34-
3529
- name: Check if https://lvgl.io/boards has a link to this repo
3630
run: |
3731
REPO_URL=$(git config --get remote.origin.url | sed 's/\.git$//')
@@ -48,8 +42,55 @@ jobs:
4842
echo "Manifest does not contain a link to this repository." && exit 1;
4943
fi
5044
45+
- name: Check for single lv_conf files
46+
run: |
47+
echo "Checking for single lv_conf.h and lv_conf.defaults files..."
48+
49+
# Find files
50+
LV_CONF_H_COUNT=$(find . -type f -name "lv_conf.h" | wc -l)
51+
LV_CONF_DEFAULT_COUNT=$(find . -type f -name "lv_conf.default" | wc -l)
52+
53+
echo "Found $LV_CONF_H_COUNT lv_conf.h file(s)."
54+
echo "Found $LV_CONF_DEFAULT_COUNT lv_conf.defaults file(s)."
55+
56+
# Validate counts
57+
if [ "$LV_CONF_H_COUNT" -ne 1 ]; then
58+
echo "❌ There should be exactly one lv_conf.h file, but found $LV_CONF_H_COUNT."
59+
exit 1
60+
fi
61+
62+
if [ "$LV_CONF_DEFAULT_COUNT" -ne 1 ]; then
63+
echo "❌ There should be exactly one lv_conf.defaults file, but found $LV_CONF_DEFAULT_COUNT."
64+
exit 1
65+
fi
66+
67+
echo "✅ File checks passed."
68+
5169
- name: Check for lv_conf.defaults in root
5270
run: |
5371
if [ ! -f lv_conf.defaults ]; then
5472
echo "lv_conf.defaults file is missing in the root directory." && exit 1;
5573
fi
74+
75+
- name: Check if the repo URL is in the branch updater
76+
run: |
77+
FILE_URL="https://raw.githubusercontent.com/lvgl/lvgl/master/scripts/release_branch_updater_port_urls.txt"
78+
REPO_URL_TO_CHECK="https://github.com/${{ github.repository }}"
79+
80+
echo "Checking if $REPO_URL_TO_CHECK exists in $FILE_URL..."
81+
82+
# Download the file and check for the URL
83+
if curl -s $FILE_URL | grep -Fxq "$REPO_URL_TO_CHECK"; then
84+
echo "✅ The repository URL is listed
85+
else
86+
echo "❌ The repository URL is NOT"
87+
exit 1
88+
fi
89+
- 1 conf and def
90+
- added to CI updater
91+
92+
- name: Check for YouTube link in README
93+
run: |
94+
if ! grep -qE 'https://(www\.)?youtube\.com|youtu\.be' README.md; then
95+
echo "README.md is missing a link to a YouTube video." && exit 1;
96+
fi

0 commit comments

Comments
 (0)