2 # A full clone takes 30 seconds, depth 20 takes 5 seconds.
4 # Using "shallow_clone: true" downloads the commit as a ZIP file so you might
5 # think that would be quicker still, but actually it seems to take ~15 seconds,
6 # and then bootstrap fails due to there not being a ".git" directory.
8 # Specify clone_folder so we can hard-code the Unix path equivalent below.
9 clone_folder: c:\projects\xapian
13 CONFIGOPTS: --disable-documentation
16 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
17 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
19 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
20 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
22 - ps: $env:PATH="c:\msys64\usr\bin;$env:PATH"
23 - bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core'
24 - if defined VCVARS_BAT call %VCVARS_BAT%
27 - 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 -'
28 # Don't build zlib with -MD as it seems this flag needs to be used
29 # consistently across the build.
30 - sed -i 's/\(^CFLAGS *= *-nologo \)-MD /\1/' win32/Makefile.msc
31 # Don't build zlib with a fixed base address on x64 as that gives linker
33 - if "%Platform%"=="x64" sed -i 's/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
34 - nmake -nologo -f win32\Makefile.msc
36 # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
37 - curl --retry 5 --retry-connrefused https://oligarchy.co.uk/xapian/patches/unicode-data16.cc > xapian-core\unicode\unicode-data.cc
41 $env:CXX="c:/projects/xapian/xapian-core/compile cl -nologo"
42 $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
43 # Standard C++ stack unwinding; assume extern "C" functions never throw.
46 $env:LDFLAGS="-Lc:/projects/xapian/zlib"
49 - bash -c 'time ./configure $CONFIGOPTS'
50 - bash -c 'time make -j2' < nul
52 - bash -c 'time make check VERBOSE=1' < nul