forked from gvanem/wsock-trace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
180 lines (161 loc) · 5.28 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
version: 1.0.{build}
#
# Skipping commits affecting these files.
#
skip_commits:
files:
- '**/*.md'
- '**/*.png'
- '**/*.jpg'
environment:
global:
CL: -nologo -MP
matrix:
- BUILDER: msvc
CPU: x86
- BUILDER: msvc
CPU: x64
- BUILDER: mingw32
CPU: x86
DEBUG: 0
- BUILDER: mingw32
CPU: x86
DEBUG: 1
- BUILDER: mingw64
CPU: x64
DEBUG: 0
- BUILDER: mingw64
CPU: x64
DEBUG: 1
- BUILDER: cygwin32
CPU: x86
DEBUG: 0
- BUILDER: cygwin32
CPU: x86
DEBUG: 1
- BUILDER: cygwin64
CPU: x64
DEBUG: 0
- BUILDER: cygwin64
CPU: x64
DEBUG: 1
- BUILDER: watcom
CPU: x86
matrix:
#
# Immediately finish build if one of the above jobs fails.
#
fast_finish: true
allow_failures:
- BUILDER: watcom
CPU: x86
- BUILDER: cygwin32
CPU: x86
- BUILDER: cygwin64
CPU: x64
#
# todo: Get better version string.
#
cache:
- wsock-trace-%APPVEYOR_BUILD_NUMBER%
install:
#
# clone the submodules.
#
- cmd: git submodule update --init --recursive
#
# Download IP2Location Database (with IPv4+IP6 addresses) and decompress using '7z'.
#
- cmd: curl -O -# http://www.watt-32.net/CI/IP46-COUNTRY.BIN.xz
- cmd: 7z x IP46-COUNTRY.BIN.xz > NUL
#
# Add a few locations to our PATH.
# And setup the compiler environment for Watcom
# (it seems it cannot be done in 'appveyor-script.bat init')
#
- cmd: set WATCOM=%CD%\watcom
- cmd: set PATH=%CD%\src;%WATCOM%\binnt;%PATH%
- cmd: set NT_INCLUDE=%WATCOM%\h;%WATCOM%\h\nt
- cmd: set DISABLEDELAYEDEXPANSION=0
- cmd: if "%BUILDER%"=="mingw32" set PATH=c:\msys64\MinGW32\bin;c:\msys64\usr\bin;%PATH%
- cmd: if "%BUILDER%"=="mingw64" set PATH=c:\msys64\MinGW64\bin;c:\msys64\usr\bin;%PATH%
- cmd: if "%BUILDER%"=="cygwin64" set PATH=c:\msys64\usr\bin;%PATH%
- cmd: if "%BUILDER%"=="cygwin32" c:\cygwin\setup-x86.exe -qgnNdO -l c:\cygwin\var\cache\setup -R c:\cygwin -s http://cygwin.mirror.constant.com & set PATH=c:\cygwin\bin;c:\msys64\usr\bin;%PATH%
#
# Set compiler environment for MSVC.
#
- cmd: if "%BUILDER%"=="msvc" call "c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /%CPU%
build_script:
- cmd: appveyor-script.bat init
#
# Download and extract OpenWatcom 2.0 using 'curl'
#
- cmd: if "%BUILDER%"=="watcom" (
curl -O -# http://www.watt-32.net/CI/watcom20.zip &
7z x -o%WATCOM% watcom20.zip > NUL)
- cmd: cd %APPVEYOR_BUILD_FOLDER%\src
- cmd: set USE_LUA=1
- cmd: set USE_IP2LOCATION=1
- cmd: set PLATFORM=%CPU%
- cmd: set CYGWIN=nodosfilewarning
- cmd: if "%BUILDER%"=="msvc" nmake -nologo -f Makefile.vc6
- cmd: if "%BUILDER%"=="mingw32" make -f Makefile.MinGW USE_CRT_DEBUG=%DEBUG%
- cmd: if "%BUILDER%"=="mingw64" make -f Makefile.MinGW USE_CRT_DEBUG=%DEBUG%
- cmd: if "%BUILDER%"=="watcom" wmake -h -f Makefile.Watcom
- cmd: if "%BUILDER%"=="cygwin32" make -f Makefile.CygWin USE_CRT_DEBUG=%DEBUG%
- cmd: if "%BUILDER%"=="cygwin64" make -f Makefile.CygWin USE_CRT_DEBUG=%DEBUG%
test_script:
- cmd: set WSOCK_TRACE_LEVEL=1 & test.exe
- cmd: set WSOCK_TRACE_LEVEL=0 & chcp 865 & idna.exe www.seoghør.no
- cmd: set WSOCK_TRACE_LEVEL=0 & idna.exe -c1252 -w www.seoghør.no
- cmd: set WSOCK_TRACE_LEVEL=0 & geoip-test.bat
- cmd: set WSOCK_TRACE_LEVEL=0 & geoip-test.bat --ip2loc_4
- cmd: set WSOCK_TRACE_LEVEL=0 & geoip-test.bat --ip2loc_6
- cmd: set WSOCK_TRACE_LEVEL=1 & set WSOCK_LUA_ENABLE=1 & test.exe WSAStartup WSACleanup
- cmd: set WSOCK_TRACE_LEVEL=1 & set WSOCK_LUA_ENABLE=0 & set WSOCK_DNSBL_TEST=1 & test.exe WSAStartup WSACleanup
#
# Prevent the 'watcom' directory to end up in 'artifacts'.
# Create a .zip of the whole thing.
#
after_test:
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: if "%BUILDER%"=="watcom" (echo Removing Watcom tree & del /S /Q watcom\* & rd watcom) > NUL
- cmd: 7z a wsock_trace-%BUILDER%-%APPVEYOR_BUILD_NUMBER%.zip .\README.md src\*.dll src\*.lib src\*.a src\*.exe src\*.lua > NUL
- cmd: 7z a wsock_trace-%BUILDER%-%APPVEYOR_BUILD_NUMBER%.zip .\wsock_trace .\geoip .\geoip6 .\drop.txt .\dropv6.txt .\edrop.txt > NUL
artifacts:
#
# Push wsock_trace-%BUILDER%-%APPVEYOR_BUILD_NUMBER%.zip as an artifact.
#
- path: wsock_trace-%BUILDER%-%APPVEYOR_BUILD_NUMBER%.zip
name: Wsock-Trace
#
# Run build only if one of the following files is modified on commit
#
only_commits:
files:
- appveyor*
- src/*.c
- src/*.h
- src/Makefile.*
#
# todo: One day...
#
# deploy:
# Deploying to NuGet feed
# - provider: NuGet
# server: https://my.nuget.server/feed
# api_key:
# secure: FYWX6NfjZIVw==
# skip_symbols: false
# symbol_server: https://your.symbol.server/feed
# artifact: MyPackage.nupkg
#
# Deploy to GitHub Releases
#
# - provider: GitHub
# artifact: /.*\.nupkg/ # upload all NuGet packages to release assets
# draft: false
# prerelease: false
# on:
# branch: master # release from master branch only
# appveyor_repo_tag: true # deploy on tag push only