ci: display tool version more selectively
The goal here is to avoid showing tool version in all case as this create issue
for non linux/docker runner that might not have some of them installed. This is
currently relevant for the coming mac runner that does not have clang-format
installed and does not needs its.
This might also be useful in the future to use narrower docker image more specialized
for each jobs.
--- a/contrib/heptapod-ci.yml Sun Oct 13 14:46:23 2024 +0200
+++ b/contrib/heptapod-ci.yml Mon Oct 14 00:15:25 2024 +0200
@@ -28,6 +28,7 @@
PYTHON: python
HG_CI_IMAGE_TAG: "v2.1"
TEST_HGTESTS_ALLOW_NETIO: "0"
+ SHOW_VERSION_OF: "$PYTHON"
.all_template: &all
when: on_success
@@ -39,9 +40,7 @@
# We make a new clone owned by user used to run the step.
before_script:
- echo "python used, $PYTHON"
- - $PYTHON --version
- - black --version
- - clang-format --version
+ - for tool in $SHOW_VERSION_OF ; do echo '#' version of $tool; $tool --version; done
- hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
- hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
- cd /tmp/mercurial-ci/
@@ -53,6 +52,7 @@
checks:
<<: *runtests
variables:
+ SHOW_VERSION_OF: "$PYTHON black clang-format"
RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
CI_CLEVER_CLOUD_FLAVOR: S