summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-09-06 18:24:25 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2022-09-06 19:33:32 +0200
commite86ede09d4593f73b00231f62a7dae7105a35ce9 (patch)
tree72987e0858f4d19fb540f24481ad7180526d01b9
parent7ab3228f21182d5e326dfd5ef3d1e645474b5051 (diff)
downloadlibxml2-e86ede09d4593f73b00231f62a7dae7105a35ce9.tar.gz
gitlab-ci: Only install cmake MinGW package if needed
On MinGW, cmake requires curl which requires nghttp2 which requires libxml2. But having a system libxml2 interferes with the Python tests for now. Ultimately, we should use Python's os.add_dll_directory() on Windows. I'm not sure why the current solution using PATH even works.
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--.gitlab-ci/setup_mingw.sh15
2 files changed, 6 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 73a2e6f4..901619be 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,7 +147,7 @@ cmake:linux:clang:static:
before_script:
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
- $Env:Path="C:\msys64\$Env:MINGW_PATH\bin;C:\msys64\usr\bin;$Env:Path"
- - bash -lc 'sh .gitlab-ci/setup_mingw.sh'
+ - bash -lc 'sh .gitlab-ci/setup_mingw.sh cmake ninja'
- .gitlab-ci/Install-7-Zip
- .gitlab-ci/Fetch-W3C-Tests
script:
diff --git a/.gitlab-ci/setup_mingw.sh b/.gitlab-ci/setup_mingw.sh
index acfab35b..74bb4a3a 100644
--- a/.gitlab-ci/setup_mingw.sh
+++ b/.gitlab-ci/setup_mingw.sh
@@ -1,16 +1,11 @@
#!/bin/sh
+pacman --noconfirm -Syu
+
prefix=
if [ -n "$MINGW_PACKAGE_PREFIX" ]; then
prefix="${MINGW_PACKAGE_PREFIX}-"
fi
-
-pacman --noconfirm -Syu
-pacman --noconfirm -S --needed \
- ${prefix}autotools \
- ${prefix}cmake \
- ${prefix}libiconv \
- ${prefix}ninja \
- ${prefix}python \
- ${prefix}xz \
- ${prefix}zlib
+for module in autotools libiconv python xz zlib "$@"; do
+ pacman --noconfirm -S --needed ${prefix}$module
+done