]> xenbits.xensource.com Git - xen-guest-agent.git/commitdiff
ci: cross-build Windows binary
authorYann Dirson <yann.dirson@vates.fr>
Mon, 20 Nov 2023 11:13:18 +0000 (12:13 +0100)
committerYann Dirson <yann.dirson@vates.fr>
Wed, 20 Dec 2023 16:34:15 +0000 (17:34 +0100)
Mostly a PoC, since we're missing crucial bits:
- Xenstore works differently on WIndows, and we don't have a crate
  supporting it yet
- pnet will not build with mingw, needs msvc, and it seems there are
  things to be done before we can use that

.gitlab-ci.yml

index e40137e9e89d105fda4d7c8f4170ae1ce7b7c9c3..a151f53bcb84ede1b622ee375e706a39f6c3a253 100644 (file)
@@ -56,6 +56,11 @@ variables:
     - PKG=$(./devscripts/freebsd-fetch-package.sh xen-tools)
     - tar -C $CROSS_SYSROOT/ --xform s,^/usr/local/,/usr/, -xf $PKG
 
+.cross-windows-build-template:
+  extends:
+    - .cross-build-template
+  variables:
+    CARGO_BUILD_TARGET: "x86_64-pc-windows-gnu"
 .scheduled:
   rules:
     - if: $CI_PIPELINE_SOURCE == "schedule"
@@ -191,6 +196,17 @@ build-release-freebsd12-x86_64:
     paths:
       - target/x86_64-unknown-freebsd/release/xen-guest-agent
 
+build-windows-x86_64:
+  extends:
+    - .cross-windows-build-template
+    - .not-scheduled
+  variables:
+    CARGO_FLAGS: "-v"
+    FEATURES: "--no-default-features"
+  artifacts:
+    paths:
+      - target/x86_64-pc-windows-gnu/debug/xen-guest-agent.exe
+
 ## continuous checking against most recent dependencies
 
 build-latest-linux: