Merge branch 'honey-spelling-changes'
[xapian.git] / .appveyor.yml
blob821374b1fb7ff70d1da9f4ef9bc459ac11accd18
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   - TOOLCHAIN: cygwin
21     platform: x86
22   - TOOLCHAIN: cygwin
23     platform: x64
24   - TOOLCHAIN: msvc
25     platform: x86
26     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
27     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86"
28   - TOOLCHAIN: msvc
29     platform: x64
30     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
31     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x64"
32   - TOOLCHAIN: msvc
33     platform: x86
34     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
35     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
36   - TOOLCHAIN: msvc
37     platform: x64
38     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
39     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
40 install:
41   - ps: >-
42       $env:CONFIGOPTS="--disable-documentation"
43   - ps: >-
44       if ($env:TOOLCHAIN -eq "mingw") {
45         $env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
46       } elseif ($env:TOOLCHAIN -eq "mingw64") {
47         if ($env:Platform -eq "x86") {
48           $env:PATH="C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;C:\msys64\usr\bin;$env:PATH"
49           $env:CONFIGOPTS+=" --host=i686-pc-mingw32"
50         } else {
51           $env:PATH="C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
52           $env:CONFIGOPTS+=" --host=x86_64-w64-mingw32"
53         }
54       } elseif ($env:TOOLCHAIN -eq "cygwin") {
55         $env:PATH="C:\cygwin64\bin;$env:PATH"
56         if ($env:Platform -eq "x86") {
57           $env:CONFIGOPTS+=""
58         } else {
59           $env:CONFIGOPTS+=" --host=x86_64-pc-cygwin"
60         }
61       } elseif ($env:TOOLCHAIN -eq "llvm") {
62         $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
63       } else {
64         $env:PATH="c:\msys64\usr\bin;$env:PATH"
65       }
66   - ps: >-
67       if ($env:Platform -eq "x64") {
68         $env:CONFIGOPTS+=" --disable-backend-remote"
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   - if "%TOOLCHAIN%"=="cygwin" C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P file-devel -P zlib-devel
78   - bash -c 'time ./bootstrap xapian-core'
79   - if "%TOOLCHAIN%"=="msvc" call %VCVARS_BAT%
80   - if "%TOOLCHAIN%"=="msvc" bash -c 'wget https://zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz && mv zlib-1.2.11 zlib'
81   - if "%TOOLCHAIN%"=="msvc" cd zlib
82   - if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
83   - if "%TOOLCHAIN%"=="msvc" cd ..
84   # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
85   - curl https://oligarchy.co.uk/xapian/patches/unicode-data.cc > xapian-core\unicode\unicode-data.cc
86   - ps: >-
87       if ($env:TOOLCHAIN -eq "msvc") {
88         $env:CC="cl -nologo"
89         $env:CXX="c:/projects/xapian/INST/share/automake-1.15/compile cl -nologo"
90         $env:CXXFLAGS="-EHsc"
91         $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
92         $env:AR="lib"
93         $env:LDFLAGS="-Lc:/projects/xapian/zlib"
94       }
95 build_script:
96   - bash -c 'time ./configure $CONFIGOPTS'
97   - bash -c 'time make -j2' < nul
98 test_script:
99   - bash -c 'time make check VERBOSE=1' < nul