Mesa (master): gitlab-ci: Add a job for meson on windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 25 23:06:06 UTC 2019


Module: Mesa
Branch: master
Commit: 19851c9ad66aa2e05c650d2310aff7515968b0da
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=19851c9ad66aa2e05c650d2310aff7515968b0da

Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Wed Oct 23 14:36:19 2019 -0700

gitlab-ci: Add a job for meson on windows

This adds a new CI job that runs on windows with MSVC. It currently
builds softpipe and osmesa, and runs the related unit tests. It does
rely on meson's wraps for zlib, but I've set up caching of the wrap
dependencies so hopefully that wont be a problem.

I really wanted to user powershell for this, but there just isn't an
easy way to do that, it's much easier to use batch scripts, so thats
what I used.

The leading `/` for .gitlab-ci/lava... must be removed because windows
doesn't understand it, and when it reads the file the job ends in error.

Reviewed-by: Eric Engestrom <eric at engestrom.ch>

---

 .gitlab-ci.yml             | 20 +++++++++++++++++++-
 .gitlab-ci/meson-build.bat | 13 +++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5e58f814409..af6324cad72 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,7 +29,7 @@ include:
     file: '/templates/debian.yml'
 
 include:
-  - local: '/.gitlab-ci/lava-gitlab-ci.yml'
+  - local: '.gitlab-ci/lava-gitlab-ci.yml'
 
 stages:
   - container
@@ -142,6 +142,15 @@ debian-10:arm64:
     - export CCACHE_DIR="$PWD/ccache"
     - ccache --show-stats
 
+.build-windows:
+  extends: .build-common
+  tags:
+    - mesa-windows
+  cache:
+    key: ${CI_JOB_NAME}
+    paths:
+      - subprojects/packagecache
+
 .meson-build:
   extends:
     - .build-linux
@@ -269,6 +278,15 @@ meson-clang:
     CC: "ccache clang-8"
     CXX: "ccache clang++-8"
 
+meson-windows:
+  extends:
+    - .build-windows
+  before_script:
+    - $ENV:ARCH = "x86"
+    - $ENV:VERSION = "2019\Community"
+  script:
+    - cmd /C .gitlab-ci\meson-build.bat
+
 scons-swr:
   extends: .scons-build
   variables:
diff --git a/.gitlab-ci/meson-build.bat b/.gitlab-ci/meson-build.bat
new file mode 100644
index 00000000000..5982a4059df
--- /dev/null
+++ b/.gitlab-ci/meson-build.bat
@@ -0,0 +1,13 @@
+call "C:\Program Files (x86)\Microsoft Visual Studio\%VERSION%\Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
+
+del /Q /S _build
+meson _build ^
+        -Dbuild-tests=true ^
+        -Db_vscrt=mtd ^
+        -Dbuildtype=release ^
+        -Dllvm=false ^
+        -Dgallium-drivers=swrast ^
+        -Dosmesa=gallium
+meson configure _build
+ninja -C _build
+ninja -C _build test




More information about the mesa-commit mailing list