summaryrefslogtreecommitdiff
path: root/.gitlab/ci.sh
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-12-15 10:46:58 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-17 21:23:23 -0500
commite04878b01f0d3fe74b57ff89505daf2512b66941 (patch)
treec88c10f63c8a3d2bbb4bea28a11314d561dd3543 /.gitlab/ci.sh
parent3f31bfe8c3c2250391ceb58ad267e0845b53bb29 (diff)
downloadhaskell-e04878b01f0d3fe74b57ff89505daf2512b66941.tar.gz
ci: Use correct metrics baseline
It turns out there was already a function in the CI script to correctly set the baseline for performance tests but it was just never called. I now call it during the initialisation to set the correct baseline. I also made the make testsuite driver take into account the PERF_BASELINE_COMMIT environment variable Fixes #20811
Diffstat (limited to '.gitlab/ci.sh')
-rwxr-xr-x.gitlab/ci.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 1eef2143fe..ca115af15a 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -449,9 +449,11 @@ function push_perf_notes() {
# Figure out which commit should be used by the testsuite driver as a
# performance baseline. See Note [The CI Story].
function determine_metric_baseline() {
- PERF_BASELINE_COMMIT="$(git merge-base "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" HEAD)"
- export PERF_BASELINE_COMMIT
- info "Using $PERF_BASELINE_COMMIT for performance metric baseline..."
+ if [ -n "${CI_MERGE_REQUEST_DIFF_BASE_SHA}:-}" ]; then
+ PERF_BASELINE_COMMIT="$CI_MERGE_REQUEST_DIFF_BASE_SHA"
+ export PERF_BASELINE_COMMIT
+ info "Using $PERF_BASELINE_COMMIT for performance metric baseline..."
+ fi
}
function test_make() {
@@ -661,6 +663,8 @@ if [ -n "${IGNORE_PERF_FAILURES:-}" ]; then
RUNTEST_ARGS="--ignore-perf-failures=$IGNORE_PERF_FAILURES"
fi
+determine_metric_baseline
+
set_toolchain_paths
case $1 in