summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-01 17:12:42 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-02 14:12:54 -0500
commit9579bf357cabca4dd311a88eb16f2325a438fadc (patch)
treeb559ff9fe05dc86883770f320bcd18bc29252015 /.gitlab
parent73864f006fa87fe16d4ede6363bf302d3b6cb202 (diff)
downloadhaskell-9579bf357cabca4dd311a88eb16f2325a438fadc.tar.gz
ci: Add check to CI to ensure compiler uses correct BIGNUM_BACKEND
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/ci.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 74cba5ea36..349a6b722b 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -382,7 +382,6 @@ function prepare_build_mk() {
if [[ -z "$BUILD_FLAVOUR" ]]; then fail "BUILD_FLAVOUR is not set"; fi
if [[ -z ${BUILD_SPHINX_HTML:-} ]]; then BUILD_SPHINX_HTML=YES; fi
if [[ -z ${BUILD_SPHINX_PDF:-} ]]; then BUILD_SPHINX_PDF=YES; fi
- if [[ -z ${BIGNUM_BACKEND:-} ]]; then BIGNUM_BACKEND=gmp; fi
cat > mk/build.mk <<EOF
BIGNUM_BACKEND=${BIGNUM_BACKEND}
@@ -557,6 +556,12 @@ function test_hadrian() {
shell ls
shell ls _build/stage-cabal/bin
+ # Ensure the resulting compiler has the correct bignum-flavour
+ test_compiler_backend=$(${test_compiler} -e "GHC.Num.Backend.backendName")
+ if [ $test_compiler_backend != "\"$BIGNUM_BACKEND\"" ]; then
+ fail "Test compiler has a different BIGNUM_BACKEND ($test_compiler_backend) thean requested ($BIGNUM_BACKEND)"
+ fi
+
run_hadrian \
test \
--summary-junit=./junit.xml \
@@ -613,7 +618,6 @@ function run_hadrian() {
if [ -z "${BUILD_FLAVOUR:-}" ]; then
fail "BUILD_FLAVOUR not set"
fi
- if [ -z "${BIGNUM_BACKEND:-}" ]; then BIGNUM_BACKEND="gmp"; fi
read -r -a args <<< "${HADRIAN_ARGS:-}"
if [ -n "${VERBOSE:-}" ]; then args+=("-V"); fi
# Before running the compiler, unset variables gitlab env vars as these
@@ -704,6 +708,8 @@ if [ -n "${IGNORE_PERF_FAILURES:-}" ]; then
RUNTEST_ARGS="--ignore-perf-failures=$IGNORE_PERF_FAILURES"
fi
+if [[ -z ${BIGNUM_BACKEND:-} ]]; then BIGNUM_BACKEND=gmp; fi
+
determine_metric_baseline
set_toolchain_paths