summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-01 17:12:42 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-03-01 17:18:16 +0000
commitbe073b4d029f721972d6930b281cee150483b7d4 (patch)
tree2effbfc4a622ce5b012f82a296ef2aef081f9f79
parentd734ef8f78203b856dcfaf19eaebfed6ec623850 (diff)
downloadhaskell-wip/bignum-backend-check.tar.gz
ci: Add check to CI to ensure compiler uses correct BIGNUM_BACKENDwip/bignum-backend-check
-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