]> git.proxmox.com Git - ovs.git/blobdiff - appveyor.yml
dpctl: Fix dpctl process command parameter error.
[ovs.git] / appveyor.yml
index b301227445d0fb5f53192cf7d71870299c7c0062..25c3f69fb48784661582b185641445ed6f5ab831 100644 (file)
@@ -1,46 +1,60 @@
 version: 1.0.{build}
+image: Visual Studio 2019
 branches:
   only:
   - master
-clone_folder: C:\openvswitch
+configuration:
+  - Debug
+  - Release
+clone_folder: C:\openvswitch_compile
 init:
+- ps: $env:PATH ="C:\Python37;"+$env:PATH
+- ps: New-Item -Type HardLink -Path "C:\Python37\python3.exe" -Value "C:\Python37\python.exe"
 - ps: >-
-    mkdir C:\pthreads-win32
-
     mkdir C:\ovs-build-downloads
 
-    $source = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip"
-
-    $destination = "C:\pthreads-win32\pthreads-win32.zip"
-
-    Invoke-WebRequest $source -OutFile $destination
+    mkdir C:\openvswitch\driver
 
-    $source = "https://slproweb.com/download/Win32OpenSSL-1_0_2n.exe"
+    $source = "https://slproweb.com/download/Win64OpenSSL-1_0_2u.exe"
 
-    $destination = "C:\ovs-build-downloads\Win32OpenSSL-1_0_2n.exe"
+    $destination = "C:\ovs-build-downloads\Win64OpenSSL-1_0_2u.exe"
 
     Invoke-WebRequest $source -OutFile $destination
 
-    cd C:\pthreads-win32
-
-    7z x C:\pthreads-win32\pthreads-win32.zip
-
     cd C:\ovs-build-downloads
 
-    .\Win32OpenSSL-1_0_2n.exe /silent /verysilent /sp- /suppressmsgboxes
+    .\Win64OpenSSL-1_0_2u.exe /silent /verysilent /sp- /suppressmsgboxes
 
     Start-Sleep -s 30
 
     cd C:\openvswitch
 
-    python3 -m pip install six pypiwin32 --disable-pip-version-check
+    git clone https://git.code.sf.net/p/pthreads4w/code c:\pthreads4w-code
+
+    python3 -m pip install pypiwin32 --disable-pip-version-check
+
+    cd C:\openvswitch_compile
 
 build_script:
-- '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd"'
+- '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"'
 - C:\MinGW\msys\1.0\bin\bash -lc "echo \"C:/MinGW /mingw\" > /etc/fstab"
-- C:\MinGW\msys\1.0\bin\bash -lc "cp /c/pthreads-win32/Pre-built.2/dll/x86/*.dll /c/openvswitch/."
 - C:\MinGW\msys\1.0\bin\bash -lc "mv /bin/link.exe /bin/link_copy.exe"
-- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./boot.sh"
-- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32\" --with-pthread=C:/pthreads-win32/Pre-built.2 --with-openssl=C:/OpenSSL-Win32 --with-vstudiotarget=\"Debug\"
-- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make"
-- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make datapath_windows_analyze"
+# Build pthreads
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/pthreads4w-code && nmake all install"
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch_compile && ./boot.sh"
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch_compile && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32\" --prefix=C:/openvswitch/usr --localstatedir=C:/openvswitch/var --sysconfdir=C:/openvswitch/etc --with-pthread=c:/PTHREADS-BUILT/ --enable-ssl --with-openssl=C:/OpenSSL-Win64 --with-vstudiotarget=\"%CONFIGURATION%\""
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch_compile && make -j 4"
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch_compile && make datapath_windows_analyze"
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch_compile && make install"
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch_compile && make windows_installer"
+- cp C:\PTHREADS-BUILT\bin\pthreadVC3.dll C:\openvswitch\usr\bin
+- cp C:\PTHREADS-BUILT\bin\pthreadVC3.dll C:\openvswitch\usr\sbin
+- ps: cp C:\openvswitch_compile\datapath-windows\x64\Win10$env:CONFIGURATION\package\* C:\openvswitch\driver
+- ps: cp C:\openvswitch_compile\datapath-windows\x64\Win10$env:CONFIGURATION\package.cer C:\openvswitch\driver
+- ps: cp C:\openvswitch_compile\datapath-windows\misc\* C:\openvswitch\driver
+- cp c:\openvswitch_compile\windows\ovs-windows-installer\bin\x64\Release\OpenvSwitch.msi c:\OpenvSwitch-%CONFIGURATION%.msi
+
+after_build:
+  - ps: 7z a C:\ovs-master-$env:CONFIGURATION.zip C:\openvswitch
+  - ps: Push-AppveyorArtifact C:\ovs-master-$env:CONFIGURATION.zip
+  - ps: Push-AppveyorArtifact C:\OpenvSwitch-$env:CONFIGURATION.msi