diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-03-08 15:52:02 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-11 20:05:41 -0400 |
commit | fcc7dc4c2848d46439bcbfae3f9eaf0a1f400ab4 (patch) | |
tree | 6608818c8139d1c26420e4ac845c1ecff7ff533f | |
parent | e3ca8dacf121f3831248775238be4807f53f7ceb (diff) | |
download | haskell-fcc7dc4c2848d46439bcbfae3f9eaf0a1f400ab4.tar.gz |
gitlab-ci: Check for dynamic msys2 dependencies
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 d9e48129a8..3bdec79b13 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 TEST_PROF=${RELEASE_JOB:-} @@ -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 |