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

Re: [PATCH] gitlab-ci: Added builds for Windows using MinGW


Hello,

> the unit tests don't need the wrapper sand should work just fine. I normally
> run them on windows. Just client testing is not working.

I could not successfully compile using MinGW because there are incompatible includes (e.g. arpa/inet.h in knowhosts.c) and undefined functions in torture.c (e.g. setenv, mkdtemp, unsetenv, lstat).
For what I could find, these functions are not provided in Windows. I'll try to create simple wrappers for them.

> 
> Could you try to enable unit testing only?
> 
> Please add the patch as an attachment.
> 

Follows attached the patch with the unit tests enabled, but it does not build due to the issues above.

Regards,
Anderson
From 40ce119abed793076575207c3143d8175a3ccf72 Mon Sep 17 00:00:00 2001
From: Anderson Toshiyuki Sasaki <ansasaki@xxxxxxxxxx>
Date: Tue, 12 Jun 2018 15:15:20 +0200
Subject: [PATCH] Added builds for Windows using MinGW

Only the unit tests are run.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@xxxxxxxxxx>
---
 .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 19a41e79..bf22cc69 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@ variables:
   FEDORA_BUILD: buildenv-fedora
   CENTOS7_BUILD: buildenv-centos7
   TUMBLEWEED_BUILD: buildenv-tumbleweed
+  MINGW_BUILD: buildenv-mingw
 
 debian/openssl_1.0.x/aarch64:
   script:
@@ -196,3 +197,39 @@ tumbleweed/static-analysis:
     when: on_failure
     paths:
       - build/scan
+
+# Build only, no testing, because cwrap is not available for mingw
+mingw64:
+  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
+  script:
+  - mkdir build && cd build && mingw64-cmake -DCMAKE_BUILD_TYPE=Debug
+    -DWITH_SSH1=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
+    -DWITH_PCAP=ON -DWITH_TESTING=ON .. && make -j$(nproc) &&
+    ctest --output-on-failure
+  tags:
+  - shared
+  except:
+  - tags
+  artifacts:
+    expire_in: 1 week
+    when: on_failure
+    paths:
+      - build/
+
+# Build only, no testing, because cwrap is not available for mingw
+mingw32:
+  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
+  script:
+  - mkdir build && cd build && mingw32-cmake -DCMAKE_BUILD_TYPE=Debug
+    -DWITH_SSH1=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
+    -DWITH_PCAP=ON -DWITH_TESTING=ON .. && make -j$(nproc) &&
+    ctest --output-on-failure
+  tags:
+  - shared
+  except:
+  - tags
+  artifacts:
+    expire_in: 1 week
+    when: on_failure
+    paths:
+      - build/
-- 
2.14.3


References:
[PATCH] gitlab-ci: Added builds for Windows using MinGWAnderson Sasaki <ansasaki@xxxxxxxxxx>
Re: [PATCH] gitlab-ci: Added builds for Windows using MinGWAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org