]> git.ipfire.org Git - thirdparty/vim.git/commit
ci: Check and confirm Vim feature flags exist before testing
authorYee Cheng Chin <ychin.git@gmail.com>
Sun, 30 Mar 2025 12:48:29 +0000 (14:48 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 30 Mar 2025 12:48:29 +0000 (14:48 +0200)
commitbb8e5ddb970a6739a25746ea195a9c37e4fefd01
tree82df6021ae39bb6fdf51a5cac941412af20a7e4f
parent1054b18291ce611932bc949b22b87b78f1975ca9
ci: Check and confirm Vim feature flags exist before testing

Vim tests for features such as python3 relies on checking the feature
flag exists by doing `has('python3')`. However, if the feature itself is
broken and the flag returns 0, the relevant tests will simply silently
get ignored and CI will passed erroneously. As a preventive measure, as
basic checks to make sure certain feature flags are correct as a basic
smoke test.

Currently only checking two types of feature flags:

1. Features that depend on system packages being installed properly
   (e.g. sodium) and could be erroneously dropped if the CI environment
   changed or a bug exists in the configure script.
2. Scripting languages. When in dynamic mode, these feature flags (e.g.
   "ruby", "python3") will return 0 when the lib cannot be found or the
   code has an initialization bug. This happened in #16964 where CI
   still passed despite Python 3 being broken.

closes: #16998

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
.github/workflows/ci.yml
Filelist
ci/if_feat_check.vim [new file with mode: 0644]
ci/if_ver-1.vim
ci/if_ver-2.vim