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 2017
29 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
32 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
33 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
36 $env:CONFIGOPTS="--disable-documentation"
38 if ($env:TOOLCHAIN -eq "mingw") {
39 $env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
40 } elseif ($env:TOOLCHAIN -eq "llvm") {
41 $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
43 $env:PATH="c:\msys64\usr\bin;$env:PATH"
45 - if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
46 - if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev'
47 - bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core'
48 - if defined VCVARS_BAT call %VCVARS_BAT%
49 - if "%TOOLCHAIN%"=="msvc" mkdir zlib
50 - if "%TOOLCHAIN%"=="msvc" cd zlib
51 - 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 -'
52 # Don't build zlib with -MD as it seems this flag needs to be used
53 # consistently across the build.
54 - if "%TOOLCHAIN%"=="msvc" sed -i 's/\(^CFLAGS *= *-nologo \)-MD /\1/' win32/Makefile.msc
55 # Don't build zlib with a fixed base address on x64 as that gives linker
57 - if "%TOOLCHAIN%-%Platform%"=="msvc-x64" sed -i 's/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
58 - if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
59 - if "%TOOLCHAIN%"=="msvc" cd ..
60 # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
61 - curl --retry 5 --retry-connrefused https://oligarchy.co.uk/xapian/patches/unicode-data15.cc > xapian-core\unicode\unicode-data.cc
63 if ($env:TOOLCHAIN -eq "msvc") {
65 $env:CXX="c:/projects/xapian/INST/share/automake-1.16/compile cl -nologo"
67 $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
69 $env:LDFLAGS="-Lc:/projects/xapian/zlib"
72 - bash -c 'time ./configure $CONFIGOPTS'
73 - bash -c 'time make -j2' < nul
75 - bash -c 'time make check VERBOSE=1' < nul