[glib-networking/ci-windows: 1/2] CI for windows



commit 8a36396a0a3ce98cfd5a34f4110c0ea16127c49f
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Thu Jan 2 15:09:22 2020 +0100

    CI for windows

 .gitlab-ci.yml           | 14 ++++++++++++++
 .gitlab-ci/test-msvc.bat | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 62fbed5..ddea5c2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
 image: registry.gitlab.gnome.org/gnome/glib-networking/master:v8
 
 fedora-x86_64:
+  stage: build
   script:
     # Sadly, GCC 9's LeakSanitizer is quite crashy, #86.
     # So we will run our tests under asan only once.
@@ -30,3 +31,16 @@ fedora-x86_64:
     paths:
       - build/test-results
     when: on_failure
+
+vs2017-x64:
+  stage: build
+  except:
+    - tags
+  tags:
+    - win32
+  script:
+    - .gitlab-ci/test-msvc.bat
+  artifacts:
+    paths:
+      - build/test-results
+    when: on_failure
diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat
new file mode 100644
index 0000000..6d742bf
--- /dev/null
+++ b/.gitlab-ci/test-msvc.bat
@@ -0,0 +1,32 @@
+@echo on
+:: 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\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
+@echo on
+
+set BUILD_DIR=c:\gnet
+
+git clone --depth 1 https://github.com/wingtk/gvsbuild.git || goto :error
+
+pushd gvsbuild
+python.exe build.py --verbose --debug build -p x64 --vs-ver 15 --build-dir %BUILD_DIR% openssl || goto :error
+popd
+
+set DEPS_DIR=%BUILD_DIR%\gtk\x64\release
+set PATH=%DEPS_DIR%\bin;%PATH%
+set LIB=%DEPS_DIR%\lib;%LIB%
+set LIBPATH=%DEPS_DIR%\lib;%LIBPATH%
+set INCLUDE=%DEPS_DIR%\include;%DEPS_DIR%\include\glib-2.0;%INCLUDE%
+
+:: FIXME: make warnings fatal
+pip3 install --upgrade --user meson==0.52.0  || goto :error
+meson build -Dgnutls=disabled -Dopenssl=enabled || goto :error
+ninja -C build || goto :error
+
+meson test -C build --timeout-multiplier=10 || goto :error
+
+:: FIXME: can we get code coverage support?
+
+goto :EOF
+:error
+exit /b 1


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