From ccb13ecc3ea74c589875c67fda823149ebdc5bc5 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Sun, 30 Apr 2023 12:47:15 +0000
Subject: [PATCH] fix: xl jobs as argument

---
 .gitlab-ci.yml               | 1 +
 containers/jug/xl.Dockerfile | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dfed02128..b852de81b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -357,6 +357,7 @@ jug_xl:default:
                    --build-arg JUGGLER_VERSION=${JUGGLER_VERSION}
                    --build-arg EICRECON_VERSION=${EICRECON_VERSION}
                    --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD)
+                   --build-arg jobs=64
                    --build-context detectors=.
                    containers/jug
 
diff --git a/containers/jug/xl.Dockerfile b/containers/jug/xl.Dockerfile
index 3d7417a1d..86513df12 100644
--- a/containers/jug/xl.Dockerfile
+++ b/containers/jug/xl.Dockerfile
@@ -13,6 +13,7 @@ ARG TARGETPLATFORM
 ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
 ARG JUGGLER_VERSION="main"
 ARG EICRECON_VERSION="main"
+ARG jobs=8
 
 ## version will automatically bust cache for nightly, as it includes
 ## the date
@@ -34,7 +35,7 @@ RUN --mount=type=cache,target=/ccache/,sharing=locked,id=${TARGETPLATFORM}
           -DCMAKE_INSTALL_PREFIX=/usr/local                                     \
           -DCMAKE_BUILD_TYPE=Release                                            \
           -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
- && cmake --build build -j12 -- install                                         \
+ && cmake --build build -j${jobs} -- install                                    \
  && pushd juggler                                                               \
  && echo " - juggler: ${JUGGLER_VERSION}-$(git rev-parse HEAD)"                 \
           >> /etc/jug_info                                                      \
@@ -54,7 +55,7 @@ RUN --mount=type=cache,target=/ccache/,sharing=locked,id=${TARGETPLATFORM}
           -DCMAKE_INSTALL_PREFIX=/usr/local                                     \
           -DCMAKE_BUILD_TYPE=Release                                            \
           -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
- && cmake --build build -j12 -- install                                         \
+ && cmake --build build -j${jobs} -- install                                    \
  && pushd eicrecon                                                              \
  && echo " - eicrecon: ${EICRECON_VERSION}-$(git rev-parse HEAD)"               \
           >> /etc/jug_info                                                      \
-- 
GitLab