-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
appveyor.yml
79 lines (68 loc) · 3.1 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: 1.0.{build}
image: Visual Studio 2019
branches:
only:
- main
configuration:
- Debug
- Release
clone_folder: C:\openvswitch_compile
shallow_clone: true
init:
- ps: $env:PATH ="C:\Python312-x64;"+$env:PATH
- ps: New-Item -Type HardLink -Path "C:\Python312-x64\python3.exe"
-Value "C:\Python312-x64\python.exe"
cache:
- C:\ovs-build-downloads
install:
- ps: |
Remove-Item -Recurse -Force -Path C:/OpenSSL-Win64
New-Item -ItemType Directory -Force -Path C:\ovs-build-downloads
# Find and download the latest stable OpenSSl 3.0.
$URL = "https://raw.githubusercontent.com/slproweb/opensslhashes/master/win32_openssl_hashes.json"
$webData = (Invoke-WebRequest -Uri $URL).content | ConvertFrom-Json
$source = ($webData.files.PSObject.Properties | Where-Object {
$_.Value.basever -match "^3\.0\.[0-9]+" -and
$_.Value.bits -eq "64" -and
$_.Value.arch -eq "INTEL" -and
$_.Value.installer -eq "exe" -and
-not $_.Value.light
} | Select-Object Value | Select -First 1).PSObject.Properties.Value
Write-Host "Latest OpenSSL 3.0:" ($source | Format-List | Out-String)
$destination = "C:\ovs-build-downloads\Win64OpenSSL.exe"
if (Test-Path $destination) {
$fileHash = (Get-FileHash $destination -Algorithm SHA256).Hash.ToLower()
if ($fileHash -ne $source.sha256) {
Write-Host "Cache miss:" $fileHash "!=" $source.sha256
Remove-Item -Path $destination
}
}
if (Test-Path $destination) {
Write-Host "Using cached:" $destination
} else {
Write-Host "Downloading:" $source.url
Invoke-WebRequest $source.url -OutFile $destination
}
Write-Host "Installing:" $destination
Start-Process -FilePath $destination `
-ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait
- ps: git clone -q https://git.code.sf.net/p/pthreads4w/code c:\pthreads4w-code
- ps: python3 -m pip install pypiwin32 --disable-pip-version-check
- '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"'
- ps: C:\msys64\msys2_shell.cmd -here -defterm -no-start -use-full-path -c
".ci/windows-prepare.sh 2>&1"
build_script:
- ps: C:\msys64\msys2_shell.cmd -here -defterm -no-start -use-full-path -c
".ci/windows-build.sh $env:CONFIGURATION 2>&1"
- ps: cp C:\PTHREADS-BUILT\bin\pthreadVC3.dll C:\openvswitch\usr\bin
- ps: cp C:\PTHREADS-BUILT\bin\pthreadVC3.dll C:\openvswitch\usr\sbin
- ps: mkdir C:\openvswitch\driver
- ps: cp datapath-windows\x64\Win10$env:CONFIGURATION\package\* C:\openvswitch\driver
- ps: cp datapath-windows\x64\Win10$env:CONFIGURATION\package.cer C:\openvswitch\driver
- ps: cp datapath-windows\misc\* C:\openvswitch\driver
- ps: cp windows\ovs-windows-installer\bin\x64\Release\OpenvSwitch.msi
c:\OpenvSwitch-$env:CONFIGURATION.msi
after_build:
- ps: 7z a C:\ovs-main-$env:CONFIGURATION.zip C:\openvswitch
- ps: Push-AppveyorArtifact C:\ovs-main-$env:CONFIGURATION.zip
- ps: Push-AppveyorArtifact C:\OpenvSwitch-$env:CONFIGURATION.msi