[honey] Fix portability to systems without pread()
[xapian.git] / .appveyor.yml
blob8d5de56832084411dd8e1d9fd7c51296ce0d1e8d
1 branches:
2   only:
3   - appveyor
4 skip_tags: true
5 # A full clone takes 30 seconds, depth 20 takes 5 seconds.
6 clone_depth: 20
7 environment:
8   global:
9     AUTOMATED_TESTING: 1
10   matrix:
11   - TOOLCHAIN: mingw
12   - TOOLCHAIN: mingw64
13   - TOOLCHAIN: cygwin
14   - TOOLCHAIN: msvc
15     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
16     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86"
17   - TOOLCHAIN: msvc
18     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
19     VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
20 platform:
21   - x86
22 install:
23   - ps: >-
24       if ($env:TOOLCHAIN -eq "mingw") {
25         $env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
26       } elseif ($env:TOOLCHAIN -eq "mingw64") {
27         $env:PATH="C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;C:\msys64\usr\bin;$env:PATH"
28       } elseif ($env:TOOLCHAIN -eq "cygwin") {
29         $env:PATH="C:\cygwin64\bin;$env:PATH"
30       } elseif ($env:TOOLCHAIN -eq "llvm") {
31         $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
32       } else {
33         $env:PATH="c:\msys64\usr\bin;$env:PATH"
34       }
35   - if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
36   - if "%TOOLCHAIN%"=="mingw" bash -c 'mingw-get install libz-dev'
37   - if "%TOOLCHAIN%"=="mingw64" bash -c 'pacman -Sy --noconfirm zlib-devel'
38   - 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
39   - bash -c 'time ./bootstrap xapian-core'
40   - if "%TOOLCHAIN%"=="msvc" call %VCVARS_BAT%
41   - 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'
42   - if "%TOOLCHAIN%"=="msvc" cd zlib
43   - if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
44   - if "%TOOLCHAIN%"=="msvc" cd ..
45   # Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
46   - curl https://oligarchy.co.uk/xapian/patches/unicode-data.cc > xapian-core\unicode\unicode-data.cc
47 build_script:
48   - if "%TOOLCHAIN%"=="mingw" bash -c 'time ./configure --disable-documentation'
49   - if "%TOOLCHAIN%"=="mingw64" bash -c 'time ./configure --disable-documentation --host=i686-pc-mingw32'
50   - if "%TOOLCHAIN%"=="cygwin" bash -c 'time ./configure --disable-documentation'
51   - if "%TOOLCHAIN%"=="msvc" bash -c 'time ./configure --disable-documentation CC="cl -nologo" CXX="/c/projects/xapian/INST/share/automake-1.15/compile cl -nologo" CXXFLAGS="-EHsc" CPPFLAGS=-I$PWD/zlib AR=lib LDFLAGS=-L$PWD/zlib'
52   - bash -c 'time make -j2' < nul
53 test_script:
54   - bash -c 'time make check VERBOSE=1' < nul