summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-09-15 12:07:08 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-08 22:45:27 -0500
commit0a76d7d415cfa8facfa6d36101210f9e2e3ff0a6 (patch)
treeb58f457ee873c8b68da8f9038024cedbaa0bd345 /.gitlab
parent5d0a311f28b96e8be2e051ae8cb08cc654d0b63e (diff)
downloadhaskell-0a76d7d415cfa8facfa6d36101210f9e2e3ff0a6.tar.gz
ci: Add job for testing interface stability across builds
The idea is that both the bindists should product libraries with the same ABI and interface hash. So the job checks with ghc-pkg to make sure the computed ABI is the same. In future this job can be extended to check for the other facets of interface determinism. Fixes #22180
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/ci.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 5a9097aaab..bce606f679 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -801,6 +801,22 @@ function lint_author(){
done
}
+function abi_of(){
+ DIR=$(realpath $1)
+ mkdir -p "$OUT"
+ pushd $DIR
+ summarise_hi_files
+ popd
+}
+
+# Checks that the interfaces in folder $1 match the interfaces in folder $2
+function compare_interfaces_of(){
+ OUT=$PWD/out/run1 abi_of $1
+ OUT=$PWD/out/run2 abi_of $2
+ check_interfaces out/run1 out/run2 abis "Mismatched ABI hash"
+ check_interfaces out/run1 out/run2 interfaces "Mismatched interface hashes"
+}
+
setup_locale
@@ -899,6 +915,7 @@ case $1 in
abi_test) abi_test ;;
cabal_test) cabal_test ;;
lint_author) shift; lint_author "$@" ;;
+ compare_interfaces_of) shift; compare_interfaces_of "$@" ;;
clean) clean ;;
save_cache) save_cache ;;
shell) shift; shell "$@" ;;