forked from xapian/xapian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
52 lines (52 loc) · 2.39 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
skip_tags: true
# A full clone takes 30 seconds, depth 20 takes 5 seconds.
#
# Using "shallow_clone: true" downloads the commit as a ZIP file so you might
# think that would be quicker still, but actually it seems to take ~15 seconds,
# and then bootstrap fails due to there not being a ".git" directory.
clone_depth: 20
# Specify clone_folder so we can hard-code the Unix path equivalent below.
clone_folder: c:\projects\xapian
environment:
global:
AUTOMATED_TESTING: 1
CONFIGOPTS: --disable-documentation
matrix:
- platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
- platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
install:
- ps: $env:PATH="c:\msys64\usr\bin;$env:PATH"
- bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core'
- if defined VCVARS_BAT call %VCVARS_BAT%
- mkdir zlib
- cd zlib
- bash -c 'curl --retry 5 --retry-connrefused -L https://github.com/xapian/xapian-dev-deps/releases/download/current/zlib-1.2.13.tar.gz|tar --strip-components=1 -zxf -'
# Don't build zlib with -MD as it seems this flag needs to be used
# consistently across the build.
- sed -i 's/\(^CFLAGS *= *-nologo \)-MD /\1/' win32/Makefile.msc
# Don't build zlib with a fixed base address on x64 as that gives linker
# warning LNK4281.
- if "%Platform%"=="x64" sed -i 's/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
- nmake -nologo -f win32\Makefile.msc
- cd ..
# Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
- curl --retry 5 --retry-connrefused https://oligarchy.co.uk/xapian/patches/unicode-data16.cc > xapian-core\unicode\unicode-data.cc
- ps: |
$env:AR="lib"
$env:CC="cl -nologo"
$env:CXX="c:/projects/xapian/xapian-core/compile cl -nologo"
$env:CPPFLAGS="-Ic:/projects/xapian/zlib"
# Standard C++ stack unwinding; assume extern "C" functions never throw.
$env:CXXFLAGS="-EHsc"
$env:LD="link"
$env:LDFLAGS="-Lc:/projects/xapian/zlib"
$env:NM="dumpbin"
build_script:
- bash -c 'time ./configure $CONFIGOPTS'
- bash -c 'time make -j2' < nul
test_script:
- bash -c 'time make check VERBOSE=1' < nul