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



commit 593a5091c9a5656e7c6f4f420cb28935984be6a0
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 6 19:27:02 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            |  4 ++--
 .gitlab-ci/setup_mingw.sh | 15 +++++----------
 2 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index da4aec46..d838d504 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,7 +51,7 @@ clang:asan:
   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 autotools'
   script:
     - bash -lc 'sh .gitlab-ci/test.sh'
 
@@ -136,7 +136,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
     - git clone --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git libxml2-source
     - cmake -G Ninja -DBUILD_SHARED_LIBS=$Env:BUILD_SHARED_LIBS -DCMAKE_INSTALL_PREFIX=libxml2-install 
-DLIBXML2_WITH_TESTS=OFF -S libxml2-source -B libxml2-build
diff --git a/.gitlab-ci/setup_mingw.sh b/.gitlab-ci/setup_mingw.sh
index acfab35b..9bfc935e 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 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]