[libxml2] gitlab-ci: Install 7-Zip using the .msi



commit 7ab3228f21182d5e326dfd5ef3d1e645474b5051
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 6 18:32:55 2022 +0200

    gitlab-ci: Install 7-Zip using the .msi
    
    So we don't need cmake to extract a file.

 .gitlab-ci.yml               | 3 ---
 .gitlab-ci/Install-7-Zip.ps1 | 6 +++---
 2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7e805d3d..73a2e6f4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -70,7 +70,6 @@ clang:asan:
     key: "$MSYSTEM"
     paths:
       - libxml2-build/xmlconf/
-      - 7za.exe
 
 mingw:w64-x86_64:shared:
   extends: .mingw
@@ -164,7 +163,6 @@ cmake:linux:clang:static:
     key: "$MSYSTEM"
     paths:
       - libxml2-build/xmlconf/
-      - 7za.exe
   artifacts:
     paths:
       - libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:MSYSTEM-$Env:SUFFIX.7z
@@ -238,7 +236,6 @@ cmake:mingw:w64-x86_64:static:
     paths:
       - cmake-$Env:CMAKE_VERSION-win64-x64/
       - libxml2-build/xmlconf/
-      - 7za.exe
   artifacts:
     paths:
       - 
libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:CMAKE_GENERATOR_TOOLSET-$Env:CMAKE_GENERATOR_PLATFORM-$Env:SUFFIX.7z
diff --git a/.gitlab-ci/Install-7-Zip.ps1 b/.gitlab-ci/Install-7-Zip.ps1
index ff94ed69..02520f81 100644
--- a/.gitlab-ci/Install-7-Zip.ps1
+++ b/.gitlab-ci/Install-7-Zip.ps1
@@ -1,4 +1,4 @@
-if (-not (Test-Path 7za.exe)) {
-    Invoke-WebRequest -Uri https://www.7-zip.org/a/7z1900-extra.7z -OutFile 7z1900-extra.7z
-    cmake -E tar xf 7z1900-extra.7z 7za.exe
+if (-not (Get-Command "7za.exe" -ErrorAction SilentlyContinue)) {
+    Invoke-WebRequest -Uri https://www.7-zip.org/a/7z2201.msi -OutFile 7z2201.msi
+    msiexec /i $Installer7Zip /qb
 }


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