freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master e222932 2/2: [ci] Add basic support for Meson builds


From: Werner Lemberg
Subject: [freetype2] master e222932 2/2: [ci] Add basic support for Meson builds with MSVC on Windows.
Date: Sun, 7 Mar 2021 12:02:32 -0500 (EST)

branch: master
commit e2229328104155dde3d843bee8024175ef53d4e0
Author: Tim-Philipp Müller <tim@centricular.com>
Commit: Werner Lemberg <wl@gnu.org>

    [ci] Add basic support for Meson builds with MSVC on Windows.
    
    This adds meson jobs for VS2017 (x86 and x86_64).
    
    * .gitlab-ci.yml: New file.
---
 .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ChangeLog      |  8 ++++++++
 2 files changed, 62 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..fa52cfa
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,54 @@
+stages:
+ - build
+
+# FIXME: Use --werror once warnings are fixed.
+variables:
+  MESON_ARGS: --fatal-meson-warnings
+  MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib
+
+.build meson windows:
+  # See
+  #   https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/213
+  image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v14-master'
+  stage: 'build'
+  tags:
+    - 'docker'
+    - 'windows'
+    - '1809'
+    - 'gstreamer-windows'
+  variables:
+    # Make sure any failure in PowerShell scripts is fatal.
+    ErrorActionPreference: 'Stop'
+    WarningPreference: 'Stop'
+    # Uncomment the following key if need to pass custom args, as well with
+    # the `$env:MESON_ARGS` line in the `script:` blocks.
+    # MESON_ARGS: >-
+    #   -Dfoo=enabled
+    #   -Dbar=disabled
+  before_script:
+    # Make sure meson is up to date, so we don't need to rebuild the image
+    # with each release.
+    - pip3 install -U meson ninja
+  script:
+    # For some reason, options are separated by newlines instead of spaces,
+    # so we have to replace them first.
+    #- $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
+    # Gitlab executes PowerShell in docker, but `VsDevCmd.bat` is a batch
+    # script.  Environment variables substitutions is done by PowerShell
+    # before calling `cmd.exe`, that's why we use `$env:FOO` instead of
+    # `%FOO%`.
+    - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 
-arch=$env:ARCH &&
+        meson setup build $env:MESON_ARGS_WINDOWS &&
+        meson compile --verbose -C build &&
+        meson test -C build &&
+        meson test -C build --benchmark"
+
+meson vs2017 amd64:
+  extends: '.build meson windows'
+  variables:
+    ARCH: 'amd64'
+
+meson vs2017 x86:
+  extends: '.build meson windows'
+  variables:
+    ARCH: 'x86'
diff --git a/ChangeLog b/ChangeLog
index c0e2511..6e90f40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2021-03-07  Tim-Philipp Müller  <tim@centricular.com>
 
+       [ci] Add basic support for Meson builds with MSVC on Windows.
+
+       This adds meson jobs for VS2017 (x86 and x86_64).
+
+       * .gitlab-ci.yml: New file.
+
+2021-03-07  Tim-Philipp Müller  <tim@centricular.com>
+
        [meson] Add subproject fallbacks for 'libpng' and 'zlib'.
 
        * subprojects/libpng.wrap, subprojects/zlib.wrap: New files.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]