-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
74 lines (60 loc) · 2.68 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
version: '{build}'
clone_depth: 5
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
GENERATOR: "MinGW Makefiles"
SDK: WpdPack
MINGW_ROOT: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
GENERATOR: "Visual Studio 15 2017"
SDK: WpdPack
matrix:
fast_finish: true
install:
- cmd: set _ECHO=c:\msys64\usr\bin\echo.exe -e
- cmd: if not exist c:\ProgramData\chocolatey\bin\win_flex.exe (
%_ECHO% "\e[1;33mDownloading and installing win_flex and win_bison.\e[0m" &
cinst winflexbison )
- cmd: where win_flex
- cmd: where win_bison
- cmd: where sleep
- cmd: if not exist "c:\Program Files (x86)\WinPcap\Uninstall.exe" (
%_ECHO% "\e[1;33mDownloading and installing WinPcap driver.\e[0m" &
cinst winpcap )
- cmd: (%_ECHO% "\e[1;33mDownloading and installing WinPcap developer pack.\e[0m" &
curl -o .\WpdPack_4_1_2.zip -# https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip &
md c:\projects\libpcap\Win32 > NUL &
7z x .\WpdPack_4_1_2.zip -oc:\projects\libpcap\Win32 > NUL )
- cmd: (%_ECHO% "\e[1;33mDownloading and installing NPcap.\e[0m" &
curl -o .\npcap-sdk-1.05.zip -# https://nmap.org/npcap/dist/npcap-sdk-1.05.zip &
7z x .\npcap-sdk-1.05.zip -oc:\projects\libpcap\Win32\npcap-sdk-1.05 > NUL )
build_script:
- (type NUL >.devel & md build & cd build &
%_ECHO% "\e[1;33mBuilding using SDK=%SDK% and GENERATOR=%GENERATOR%.\e[0m")
# Remove the default MinGW path
#
- if "%GENERATOR%" == "MinGW Makefiles" set PATH=%PATH:C:\MinGW\bin;=%
# Add the specified MinGW path
#
- if "%GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_ROOT%\mingw64\bin;%PATH%
# Remove the path to Git, so that we don't pick up its sh.exe, as
# that breaks MinGW builds - CMake checks for that and fails in the configuration stage
#
- if "%GENERATOR%" == "MinGW Makefiles" set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- cmake -DPacket_ROOT=c:\projects\libpcap\Win32\%SDK% -G "%GENERATOR%" ..
- if "%GENERATOR%" == "MinGW Makefiles" ( mingw32-make ) else ( msbuild -nologo -m -p:Configuration=Release pcap.sln )
test_script:
- cmd: if "%GENERATOR%" == "MinGW Makefiles" (
set PROG=run\rpcapd.exe
) else (
set PROG=run\Release\findalldevstest.exe
)
%_ECHO% "\e[1;33mTrying to run %PROG%.\e[0m"
start /min %PROG%
c:\msys64\usr\bin\sleep 10
taskkill /F /IM %PROG%
cache:
- 'c:\Users\appveyor\AppData\Local\1\Temp\chocolatey'
- 'c:\ProgramData\chocolatey'
- 'c:\Program Files (x86)\WinPcap'