From 14169c10e7da972f9d0860ea31df845c0dcd25e9 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 17 Sep 2026 09:22:53 +0200 Subject: [PATCH 1/2] [ci] fix typo in replicate build message Fixes https://github.com/root-project/root/issues/23374 --- .github/workflows/root-ci-config/build_root.py | 2 +- .../workflows/root-ci-config/build_utils.py | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/root-ci-config/build_root.py b/.github/workflows/root-ci-config/build_root.py index b3dff0ad1ae20..b5ebd52922f8e 100755 --- a/.github/workflows/root-ci-config/build_root.py +++ b/.github/workflows/root-ci-config/build_root.py @@ -50,7 +50,7 @@ def main(): args = parse_args() - build_utils.log = build_utils.Tracer(args.platform_config, args.dockeropts) + build_utils.log = build_utils.Tracer(args.platform, args.platform_config, args.dockeropts) pull_request = args.head_ref and args.head_ref != args.base_ref diff --git a/.github/workflows/root-ci-config/build_utils.py b/.github/workflows/root-ci-config/build_utils.py index 9ca76bd3438c9..8e3d81f7ff591 100755 --- a/.github/workflows/root-ci-config/build_utils.py +++ b/.github/workflows/root-ci-config/build_utils.py @@ -56,12 +56,14 @@ class Tracer: Trace command invocations and print them to reproduce builds. """ - image = "" + platform = "" + platform_config = "" docker_opts = [] trace = "" - def __init__(self, image: str, docker_opts: str): - self.image = image + def __init__(self, platform: str, platform_config: str, docker_opts: str): + self.platform = platform + self.platform_config = platform_config if docker_opts: self.docker_opts = docker_opts.split(' ') if '--rm' in self.docker_opts: @@ -73,16 +75,20 @@ def add(self, command: str) -> None: @github_log_group("To replicate this build locally") def print(self) -> None: if self.trace != "": - if self.image and not is_macos(): + if self.platform and not is_macos(): print(f"""\ # Grab the image and set up the python virtual environment: -docker run {' '.join(self.docker_opts)} -it registry.cern.ch/root-ci/{self.image}:buildready +docker run {' '.join(self.docker_opts)} -it registry.cern.ch/root-ci/{self.platform}:buildready if [ -d /py-venv/ROOT-CI/bin/ ]; then . /py-venv/ROOT-CI/bin/activate && echo PATH=$PATH >> $GITHUB_ENV; fi +""") + if self.platform != self.platform_config: + print(f"""\ +# Here you need to set manually flags from {self.platform_config} when configuring """) print(self.trace) -log = Tracer("", "") +log = Tracer("", "", "") def print_fancy(*values, sgr=1, **kwargs) -> None: From f3950a4d1f798b097b4629807101960817e097ee Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 17 Sep 2026 12:05:17 +0200 Subject: [PATCH 2/2] [nfc] fix comment CMake flags will already contain the right overrides --- .github/workflows/root-ci-config/build_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/root-ci-config/build_utils.py b/.github/workflows/root-ci-config/build_utils.py index 8e3d81f7ff591..08fb2cb84abee 100755 --- a/.github/workflows/root-ci-config/build_utils.py +++ b/.github/workflows/root-ci-config/build_utils.py @@ -83,7 +83,7 @@ def print(self) -> None: """) if self.platform != self.platform_config: print(f"""\ -# Here you need to set manually flags from {self.platform_config} when configuring +# Note that the variant {self.platform_config} will be used when configuring """) print(self.trace)