[Git][ghc/ghc][wip/hackage-bindist] Add job for testing ABI stability across builds
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Thu Sep 15 11:13:51 UTC 2022
Matthew Pickering pushed to branch wip/hackage-bindist at Glasgow Haskell Compiler / GHC
Commits:
ade4a6aa by Matthew Pickering at 2022-09-15T12:13:42+01:00
Add job for testing ABI stability across builds
The idea is that both the bindists should product libraries with the
same ABI. 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
- - - - -
2 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -396,6 +396,37 @@ test-cabal-reinstall-x86_64-linux-deb10:
rules:
- if: $NIGHTLY
+########################################
+# Testing ABI is invariant across builds
+########################################
+
+abi-test:
+ stage: full-build
+ needs:
+ - job: x86_64-linux-fedora33-release-hackage
+ - job: x86_64-linux-fedora33-release
+ tags:
+ - x86_64-linux
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
+ dependencies: null
+ variables:
+ # Don't clone the git repo..
+ GIT_STRATEGY: none
+ # Don't attempt to boot a source tarball
+ NO_BOOT: "1"
+ before_script:
+ - mkdir -p normal
+ - mkdir -p hackage
+ - tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C normal/
+ - tar -xf ghc-x86_64-linux-fedora33-release-hackage_docs.tar.xz -C hackage/
+ script:
+ - .gitlab/ci.sh abi_of "normal/ghc-*" > abi-normal
+ - .gitlab/ci.sh abi_of "hackage/ghc-*" > abi-hackage
+ - diff abi-normal abi-hackage
+ rules:
+ - if: $NIGHTLY
+ - if: '$RELEASE_JOB == "yes"'
+
############################################################
# Packaging
############################################################
=====================================
.gitlab/ci.sh
=====================================
@@ -720,6 +720,13 @@ function lint_author(){
done
}
+function abi_of(){
+ DIR=$(realpath $1)
+ HC_PKG="$DIR/bin/ghc-pkg"
+ PKGS=$("$HC_PKG" list --global --simple | sort)
+ for p in $PKGS; do echo "$p: $("$HC_PKG" field $p abi --simple-output)"; done
+}
+
setup_locale
@@ -817,6 +824,7 @@ case $1 in
perf_test) run_perf_test ;;
cabal_test) cabal_test ;;
lint_author) shift; lint_author "$@" ;;
+ abi_of) shift; abi_of "$@" ;;
clean) clean ;;
save_cache) save_cache ;;
shell) shift; shell "$@" ;;
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ade4a6aaa0b2d64c809bb6cb6ccf3706b848ebc6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ade4a6aaa0b2d64c809bb6cb6ccf3706b848ebc6
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220915/ad19362f/attachment-0001.html>
More information about the ghc-commits
mailing list