diff options
-rw-r--r-- | .gitlab-ci.yml | 27 | ||||
-rwxr-xr-x | .gitlab/ci.sh | 17 |
2 files changed, 44 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6ef3e2c3f..d9c7ff1761 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -405,6 +405,33 @@ test-cabal-reinstall-x86_64-linux-deb10: rules: - if: $NIGHTLY +######################################## +# Testing ABI is invariant across builds +######################################## + +abi-test-nightly: + stage: full-build + needs: + - job: nightly-x86_64-linux-fedora33-release-hackage + - job: nightly-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 + 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 compare_interfaces_of "normal/ghc-*" "hackage/ghc-*" + artifacts: + paths: + - out + rules: + - if: $NIGHTLY + - if: '$RELEASE_JOB == "yes"' + ############################################################ # Packaging ############################################################ 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 "$@" ;; |