diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-03-08 15:52:02 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-04-26 11:09:15 -0400 |
commit | 4204bea09d28badaccdd6c7c9026ae73a03bdc11 (patch) | |
tree | 3703827660a268571d9a7291e76412c0d4e24ae6 | |
parent | f2c08124b30eb87482dc0ed1d7199aa58950e309 (diff) | |
download | haskell-wip/T20878.tar.gz |
gitlab-ci: Check for dynamic msys2 dependencieswip/T20878
Both #20878 and #21196 were caused by unwanted dynamic dependencies
being introduced by boot libraries. Ensure that we catch this in CI by
attempting to run GHC in an environment with a minimal PATH.
-rwxr-xr-x | .gitlab/ci.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index b91161896a..0cf4a23963 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -469,6 +469,17 @@ function determine_metric_baseline() { fi } +function check_msys2_deps() { + # Ensure that GHC on Windows doesn't have any dynamic dependencies on msys2 + case "$(uname)" in + MSYS_*|MINGW*) + sysroot="$(cygpath "$SYSTEMROOT")" + PATH="$sysroot/System32:$sysroot;$sysroot/Wbem" $@ \ + || fail "'$@' failed; there may be unwanted dynamic dependencies." + ;; + esac +} + # If RELEASE_JOB = yes then we skip builds with a validate flavour. # This has the effect of # (1) Skipping validate jobs when trying to do release builds @@ -490,6 +501,7 @@ function test_make() { return fi + check_msys2_deps inplace/bin/ghc-stage2 --version check_release_build run "$MAKE" test_bindist TEST_PREP=YES @@ -529,6 +541,7 @@ function test_hadrian() { return fi + check_msys2_deps _build/stage1/bin/ghc --version check_release_build # Ensure that statically-linked builds are actually static |