From bae545141808b65bf8b4faa135e12f748c14da3c Mon Sep 17 00:00:00 2001
From: Sylvester Joosten <sjoosten@anl.gov>
Date: Sat, 30 Jan 2021 22:43:18 +0000
Subject: [PATCH] only set root build_dir for local builds

---
 .rootlogon.C               | 9 +++++++--
 benchmarks/dvmp/config.yml | 4 ++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/.rootlogon.C b/.rootlogon.C
index 7055e912..d4331f37 100644
--- a/.rootlogon.C
+++ b/.rootlogon.C
@@ -7,8 +7,13 @@
 
   // setup a local build directory so we don't polute our source code with
   // ROOT dictionaries etc.
-  gSystem->Exec("mkdir -p /tmp/root_build");
-  gSystem->SetBuildDir("/tmp/root_build");
+  // note: don't do this for CI as this always fails the first time
+  //       we try to compile with a build_dir (as somehow the build_dir gets created only
+  //       after the compile files...)
+  const char* is_ci = gSystem->Getenv("CI");
+  if (!is_ci) {
+    gSystem->SetBuildDir("/tmp/root_build");
+  }
 
   // style definition based off the ATLAS style
   TStyle* s = gStyle;
diff --git a/benchmarks/dvmp/config.yml b/benchmarks/dvmp/config.yml
index b9e831fb..d9ffba81 100644
--- a/benchmarks/dvmp/config.yml
+++ b/benchmarks/dvmp/config.yml
@@ -35,6 +35,10 @@ dvmp:process:
   artifacts:
     paths:
       - results
+  retry:
+    max: 2
+    when:
+      - runner_system_failure
 
 dvmp:results:
   stage: collect
-- 
GitLab