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..08fb2cb84abee 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"""\ +# Note that the variant {self.platform_config} will be used when configuring """) print(self.trace) -log = Tracer("", "") +log = Tracer("", "", "") def print_fancy(*values, sgr=1, **kwargs) -> None: