summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-09-29 16:07:01 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-01 09:05:20 -0400
commite3701815d2b0e8c4f46ff67d7feb0b89faa919f9 (patch)
tree631f67123414df2b83fbe8b4cf4d39d45ccbfa6d
parent9600a5fbd79c8434cf68aad078f26577da0530ad (diff)
downloadhaskell-e3701815d2b0e8c4f46ff67d7feb0b89faa919f9.tar.gz
ci: Unset CI_* variables before run_hadrian and test_make
The goal here is to somewhat sanitize the environment so that performance tests don't fluctuate as much as they have been doing. In particular the length of the commit message was causing benchmarks to increase because gitlab stored the whole commit message twice in environment variables. Therefore when we used `getEnvironment` it would cause more allocation because more string would be created. See #20431 ------------------------- Metric Decrease: T10421 T13035 T18140 T18923 T9198 T12234 T12425 -------------------------
-rwxr-xr-x.gitlab/ci.sh28
1 files changed, 16 insertions, 12 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 9a0e940ee7..fd39622726 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -447,10 +447,11 @@ function test_make() {
fi
run "$MAKE" test_bindist TEST_PREP=YES
- run "$MAKE" V=0 VERBOSE=1 test \
- THREADS="$cores" \
- JUNIT_FILE=../../junit.xml \
- EXTRA_RUNTEST_OPTS="${RUNTEST_ARGS:-}"
+ (unset $(compgen -v | grep CI_*);
+ run "$MAKE" V=0 VERBOSE=1 test \
+ THREADS="$cores" \
+ JUNIT_FILE=../../junit.xml \
+ EXTRA_RUNTEST_OPTS="${RUNTEST_ARGS:-}")
}
function build_hadrian() {
@@ -541,14 +542,17 @@ function run_hadrian() {
if [ -z "${BIGNUM_BACKEND:-}" ]; then BIGNUM_BACKEND="gmp"; fi
read -r -a args <<< "${HADRIAN_ARGS:-}"
if [ -n "${VERBOSE:-}" ]; then args+=("-V"); fi
- run hadrian/build-cabal \
- --flavour="$BUILD_FLAVOUR" \
- -j"$cores" \
- --broken-test="${BROKEN_TESTS:-}" \
- --bignum=$BIGNUM_BACKEND \
- -V \
- "${args[@]+"${args[@]}"}" \
- "$@"
+ # Before running the compiler, unset variables gitlab env vars as these
+ # can destabilise the performance test (see #20341)
+ (unset $(compgen -v | grep CI_*);
+ run hadrian/build-cabal \
+ --flavour="$BUILD_FLAVOUR" \
+ -j"$cores" \
+ --broken-test="${BROKEN_TESTS:-}" \
+ --bignum=$BIGNUM_BACKEND \
+ -V \
+ "${args[@]+"${args[@]}"}" \
+ "$@")
}
# A convenience function to allow debugging in the CI environment.