From 813be9f4721d60b840125226a977a1e74379f6ad Mon Sep 17 00:00:00 2001 From: Cheng Shao <terrorjack@type.dance> Date: Thu, 22 Feb 2024 18:50:17 +0000 Subject: [PATCH] ci: enable parallelism in hadrian/ghci scripts This commit enables parallelism when the hadrian/ghci scripts are called in CI. The time bottleneck is in the hadrian build step, but previously the build step wasn't parallelized. (cherry picked from commit 50bfdb46962ca377bb1b9fffd91ed78288590a17) (cherry picked from commit b5df6e693331b0e27e5c0031e830c5f14f79fa26) --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 015abbedd63..56bbbe97993 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -363,7 +363,8 @@ hadrian-ghc-in-ghci: - .gitlab/ci.sh setup - .gitlab/ci.sh configure # Load ghc-in-ghci then immediately exit and check the modules loaded - - echo ":q" | hadrian/ghci -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok," + - export CORES="$(mk/detect-cpu-count.sh)" + - echo ":q" | HADRIAN_ARGS=-j$CORES hadrian/ghci -j$CORES | tail -n2 | grep "Ok," after_script: - .gitlab/ci.sh save_cache - cat ci-timings @@ -414,8 +415,9 @@ hadrian-multi: - .gitlab/ci.sh configure # Now GHC means, use this GHC for hadrian - export GHC=$BOOT_HC + - export CORES="$(mk/detect-cpu-count.sh)" # Load hadrian-multi then immediately exit and check the modules loaded - - echo ":q" | hadrian/ghci-multi -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok," + - echo ":q" | HADRIAN_ARGS=-j$CORES hadrian/ghci-multi -j$CORES | tail -n2 | grep "Ok," after_script: - .gitlab/ci.sh save_cache cache: -- GitLab