[glib: 6/7] Add Windows native static build using msvc to CI




commit 097cd3a16bdd34dce195a3f42e9168a8f540b98f
Author: Loïc Le Page <llepage fluendo com>
Date:   Fri Jan 14 17:01:16 2022 +0100

    Add Windows native static build using msvc to CI

 .gitlab-ci.yml           | 23 ++++++++++++++++++++++-
 .gitlab-ci/test-msvc.bat | 11 +++++++++--
 2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ec76291f1..59f20920c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -332,7 +332,9 @@ vs2017-x64:
     - win32-ps
   needs: []
   script:
-    - .gitlab-ci/test-msvc.bat
+    # FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
+    # aren’t currently set up for that.
+    - .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS} --wrap-mode=default
   artifacts:
     reports:
       junit: "_build/${env:CI_JOB_NAME}-report.xml"
@@ -347,6 +349,25 @@ vs2017-x64:
       - _build/gthread/libgthread-2.0-0.dll
       - _build/gobject/libgobject-2.0-0.dll
 
+vs2017-x64-static:
+  extends: .only-default
+  stage: build
+  tags:
+    - win32-ps
+  needs: []
+  script:
+    # FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
+    # aren’t currently set up for that.
+    - .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS} --wrap-mode=default --default-library=static
+  artifacts:
+    reports:
+      junit: "_build/${env:CI_JOB_NAME}-report.xml"
+    name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
+    when: always
+    paths:
+      - _build/meson-logs
+      - "_build/${env:CI_JOB_NAME}-report.xml"
+
 freebsd-12-x86_64:
   stage: build
   only:
diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat
index aeb09664f..1a6924bd2 100644
--- a/.gitlab-ci/test-msvc.bat
+++ b/.gitlab-ci/test-msvc.bat
@@ -2,11 +2,18 @@
 :: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
 :: specified build architecture
 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
-@echo on
+
+:: Remove quotes from script args
+setlocal enabledelayedexpansion
+set args=
+for %%x in (%*) do (
+  set args=!args! %%~x
+)
+set args=%args:~1%
 
 :: FIXME: make warnings fatal
 pip3 install --upgrade --user meson==0.52.0  || goto :error
-meson _build || goto :error
+meson %args% _build || goto :error
 ninja -C _build || goto :error
 
 :: FIXME: dont ignore test errors


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