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
14 # Disable for now as package download is currently failing most of the time with:
16 # mingw-get.exe: *** ERROR *** http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz:cannot open URL; status = 12002
20 # mingw-get.exe: *** ERROR *** Get package: http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz: download failed
21 # mingw-get.exe: *** WARNING *** http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz: opened with unexpected status: code = 500
25 # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
28 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
29 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86"
32 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
33 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x64"
36 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
37 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
40 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
41 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
44 $env:CONFIGOPTS="--disable-documentation"
46 if ($env:TOOLCHAIN -eq "mingw") {
47 $env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
48 } elseif ($env:TOOLCHAIN -eq "llvm") {
49 $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
51 $env:PATH="c:\msys64\usr\bin;$env:PATH"
53 - if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
54 - if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev'
55 - bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core'
56 - if defined VCVARS_BAT call %VCVARS_BAT%
57 - if "%TOOLCHAIN%"=="msvc" mkdir zlib
58 - if "%TOOLCHAIN%"=="msvc" cd zlib
59 - if "%TOOLCHAIN%"=="msvc" 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 -'
60 # Don't build zlib with -MD as it seems this flag needs to be used
61 # consistently across the build.
62 - if "%TOOLCHAIN%"=="msvc" sed -i 's/\(^CFLAGS *= *-nologo \)-MD /\1/' win32/Makefile.msc
63 # Don't build zlib with a fixed base address on x64 as that gives linker
65 - if "%TOOLCHAIN%-%Platform%"=="msvc-x64" sed -i 's/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
66 - if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
67 - if "%TOOLCHAIN%"=="msvc" cd ..
68 # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
69 - curl --retry 5 --retry-connrefused https://oligarchy.co.uk/xapian/patches/unicode-data.cc > xapian-core\unicode\unicode-data.cc
71 if ($env:TOOLCHAIN -eq "msvc") {
73 $env:CXX="c:/projects/xapian/INST/share/automake-1.16/compile cl -nologo"
75 $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
77 $env:LDFLAGS="-Lc:/projects/xapian/zlib"
80 - bash -c 'time ./configure $CONFIGOPTS'
81 - bash -c 'time make -j2' < nul
83 - bash -c 'time make check VERBOSE=1' < nul