[libxml2] gitlab-ci: Only install cmake MinGW package if needed



commit e86ede09d4593f73b00231f62a7dae7105a35ce9
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 6 18:24:25 2022 +0200

    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.

 .gitlab-ci.yml            |  2 +-
 .gitlab-ci/setup_mingw.sh | 15 +++++----------
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]