[honey] Don't access stale fds after Database::close()
[xapian.git] / .appveyor.yml
blob768709128e0000e467d374d4e52140a6454a5545
1 skip_tags: true
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.
7 clone_depth: 20
8 # Specify clone_folder so we can hard-code the Unix path equivalent below.
9 clone_folder: c:\projects\xapian
10 environment:
11   global:
12     AUTOMATED_TESTING: 1
13   matrix:
14   - TOOLCHAIN: mingw
15     platform: x86
16   - TOOLCHAIN: mingw64
17     platform: x86
18   - TOOLCHAIN: mingw64
19     platform: x64
20 # Fails trying to run apitest.exe etc for unknown reasons.
21 #  - TOOLCHAIN: cygwin
22 #    platform: x86
23   - TOOLCHAIN: cygwin
24     platform: x64
25   - TOOLCHAIN: msvc
26     platform: x86
27     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
28     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86"
29 # We get exit code 127 trying to run apitest.exe but no error message.
30 # Other test programs which link to libxapian fail too.  unittest.exe OK.
31 #  - TOOLCHAIN: msvc
32 #    platform: x64
33 #    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
34 #    VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x64"
35   - TOOLCHAIN: msvc
36     platform: x86
37     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
38     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
39   - TOOLCHAIN: msvc
40     platform: x64
41     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
42     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
43 install:
44   - ps: >-
45       $env:CONFIGOPTS="--disable-documentation"
46   - ps: >-
47       if ($env:TOOLCHAIN -eq "mingw") {
48         $env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
49       } elseif ($env:TOOLCHAIN -eq "mingw64") {
50         if ($env:Platform -eq "x86") {
51           $env:PATH="C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;C:\msys64\usr\bin;$env:PATH"
52           $env:CONFIGOPTS+=" --host=i686-pc-mingw32"
53         } else {
54           $env:PATH="C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
55           $env:CONFIGOPTS+=" --host=x86_64-w64-mingw32"
56         }
57       } elseif ($env:TOOLCHAIN -eq "cygwin") {
58         # Use 64-bit cygwin install for 32 bit build too to avoid DLL mapping issues.
59         $env:PATH="C:\cygwin64\bin;$env:PATH"
60         if ($env:Platform -eq "x86") {
61           $env:CONFIGOPTS+=" --host=i686-pc-cygwin"
62         } else {
63           $env:CONFIGOPTS+=" --host=x86_64-pc-cygwin"
64         }
65       } elseif ($env:TOOLCHAIN -eq "llvm") {
66         $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
67       } else {
68         $env:PATH="c:\msys64\usr\bin;$env:PATH"
69       }
70   - ps: >-
71       if ($env:TOOLCHAIN -ne "cygwin") {
72         $env:CONFIGOPTS+=" --disable-backend-honey"
73       }
74   - if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
75   - if "%TOOLCHAIN%"=="mingw" bash -c 'mingw-get install libz-dev'
76   - if "%TOOLCHAIN%"=="mingw64" bash -c 'pacman -Sy --noconfirm zlib-devel'
77   # Install cygwin git and patch packages since those installed in the image
78   # want the 32-bit cygwin1.dll which means they fail to work if the 64-bit
79   # cygwin1.dll is first on PATH.
80   - if "%TOOLCHAIN%-%Platform%"=="cygwin-x64" 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
81   - if "%TOOLCHAIN%-%Platform%"=="cygwin-x86" 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
82   - bash -c 'time ./bootstrap --fetch-url-command="curl -L" xapian-core'
83   - if defined VCVARS_BAT call %VCVARS_BAT%
84   - if "%TOOLCHAIN%"=="msvc" mkdir zlib
85   - if "%TOOLCHAIN%"=="msvc" cd zlib
86   - if "%TOOLCHAIN%"=="msvc" bash -c 'curl -L https://github.com/xapian/xapian-dev-deps/releases/download/current/zlib-1.2.11.tar.gz|tar --strip-components=1 -zxf -'
87   - if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
88   - if "%TOOLCHAIN%"=="msvc" cd ..
89   # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
90   - curl https://oligarchy.co.uk/xapian/patches/unicode-data11.cc > xapian-core\unicode\unicode-data.cc
91   - ps: >-
92       if ($env:TOOLCHAIN -eq "msvc") {
93         $env:CC="cl -nologo"
94         $env:CXX="c:/projects/xapian/INST/share/automake-1.16/compile cl -nologo"
95         $env:CXXFLAGS="-EHsc"
96         $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
97         $env:AR="lib"
98         $env:LDFLAGS="-Lc:/projects/xapian/zlib"
99       }
100 build_script:
101   - bash -c 'time ./configure $CONFIGOPTS'
102   - bash -c 'time make -j2' < nul
103 test_script:
104   - bash -c 'time make check VERBOSE=1' < nul