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
16 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
19 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
22 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
23 # Fails trying to run apitest.exe etc for unknown reasons.
25 # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
29 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
32 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
33 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86"
36 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
37 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x64"
40 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
41 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
44 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
45 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
48 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
49 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
52 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
53 VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
56 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
57 VCVARS_BAT: "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
60 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
61 VCVARS_BAT: "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
64 # mingw build currently sometimes fails due to trying to delete open files.
65 # It's unclear what the problem is, so until we manage to debug this allow
66 # this build to fail without flagging CI as having failed.
71 $env:CONFIGOPTS="--disable-documentation"
73 if ($env:TOOLCHAIN -eq "mingw") {
74 $env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
75 } elseif ($env:TOOLCHAIN -eq "mingw64") {
76 if ($env:Platform -eq "x86") {
77 $env:PATH="C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;C:\msys64\usr\bin;$env:PATH"
78 $env:CONFIGOPTS+=" --host=i686-pc-mingw32"
80 $env:PATH="C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
81 $env:CONFIGOPTS+=" --host=x86_64-w64-mingw32"
83 } elseif ($env:TOOLCHAIN -eq "cygwin") {
84 # Use 64-bit cygwin install for 32 bit build too to avoid DLL mapping issues.
85 $env:PATH="C:\cygwin64\bin;$env:PATH"
86 if ($env:Platform -eq "x86") {
87 $env:CONFIGOPTS+=" --host=i686-pc-cygwin"
89 $env:CONFIGOPTS+=" --host=x86_64-pc-cygwin"
91 } elseif ($env:TOOLCHAIN -eq "llvm") {
92 $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
94 $env:PATH="c:\msys64\usr\bin;$env:PATH"
97 if ($env:TOOLCHAIN -ne "cygwin") {
98 $env:CONFIGOPTS+=" --disable-backend-honey"
100 - if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
101 - if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev'
102 # Workaround appveyor's container having old maintainer keys:
103 - if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'curl -O https://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz'
104 - if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'curl -O https://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig'
105 - if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig'
106 - if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz'
107 - if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman -Sy --noconfirm zlib-devel'
108 # Work around odd ownership of directories in CI build image.
109 - if "%TOOLCHAIN%"=="cygwin" bash -c 'git config --global --add safe.directory /cygdrive/c/projects/xapian'
110 # Install cygwin git and patch packages since those installed in the image
111 # want the 32-bit cygwin1.dll which means they fail to work if the 64-bit
112 # cygwin1.dll is first on PATH.
113 - if "%TOOLCHAIN%-%Platform%"=="cygwin-x64" appveyor-retry C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P zlib-devel -P git -P patch
114 - if "%TOOLCHAIN%-%Platform%"=="cygwin-x86" appveyor-retry C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P cygwin32-zlib -P cygwin32-gcc-core -P cygwin32-gcc-g++ -P git -P patch
115 - bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core'
116 - if defined VCVARS_BAT call %VCVARS_BAT%
117 - if "%TOOLCHAIN%"=="msvc" mkdir zlib
118 - if "%TOOLCHAIN%"=="msvc" cd zlib
119 - if "%TOOLCHAIN%"=="msvc" bash -c 'curl --retry 5 --retry-connrefused -L https://github.com/xapian/xapian-dev-deps/releases/download/current/zlib-1.2.11.tar.gz|tar --strip-components=1 -zxf -'
120 # Don't build zlib with -MD as it seems this flag needs to be used
121 # consistently across the build.
122 - if "%TOOLCHAIN%"=="msvc" sed -i 's/\(^CFLAGS *= *-nologo \)-MD /\1/' win32/Makefile.msc
123 # Don't build zlib with a fixed base address on x64 as that gives linker
125 - if "%TOOLCHAIN%-%Platform%"=="msvc-x64" sed -i 's/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
126 - if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
127 - if "%TOOLCHAIN%"=="msvc" cd ..
128 # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
129 - curl --retry 5 --retry-connrefused https://oligarchy.co.uk/xapian/patches/unicode-data.cc > xapian-core\unicode\unicode-data.cc
131 if ($env:TOOLCHAIN -eq "msvc") {
133 $env:CXX="c:/projects/xapian/INST/share/automake-1.16/compile cl -nologo"
134 $env:CXXFLAGS="-EHsc"
135 $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
137 $env:LDFLAGS="-Lc:/projects/xapian/zlib"
140 - bash -c 'time ./configure $CONFIGOPTS'
141 - bash -c 'time make -j2' < nul
143 - bash -c 'time make check VERBOSE=1' < nul