summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-09-29 16:07:01 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2021-09-30 12:43:41 +0100
commit30646ba1c16a3e89f05c0b8640c58d0ed9769afa (patch)
tree98c98edfc343066aab24bbef3b6bf4603d73b27f
parent028abd5bf398db6d872a10342695e8e84e0827b3 (diff)
downloadhaskell-wip/long-commit-ci.tar.gz
ci: Unset CI_* variables before run_hadrian and test_makewip/long-commit-ci
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.