Use _exit() after fork()
[xapian.git] / .appveyor.yml
blobba422da061a22fa4d36891f439e99e92f861a2b3
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   # Disable for now as package download is currently failing most of the time with:
15   #
16   # mingw-get.exe: *** ERROR *** http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz:cannot open URL; status = 12002
17   #
18   # or:
19   #
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
22   #
23   #  - TOOLCHAIN: mingw
24   #    platform: x86
25   #    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
26   - TOOLCHAIN: msvc
27     platform: x86
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\""
30   - TOOLCHAIN: msvc
31     platform: x64
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\""
34 install:
35   - ps: >-
36       $env:CONFIGOPTS="--disable-documentation"
37   - ps: >-
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"
42       } else {
43         $env:PATH="c:\msys64\usr\bin;$env:PATH"
44       }
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
56   # warning LNK4281.
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-data151.cc > xapian-core\unicode\unicode-data.cc
62   - ps: >-
63       if ($env:TOOLCHAIN -eq "msvc") {
64         $env:CC="cl -nologo"
65         $env:CXX="c:/projects/xapian/INST/share/automake-1.16/compile cl -nologo"
66         $env:CXXFLAGS="-EHsc"
67         $env:CPPFLAGS="-Ic:/projects/xapian/zlib"
68         $env:AR="lib"
69         $env:LD="link"
70         $env:LDFLAGS="-Lc:/projects/xapian/zlib"
71         $env:NM="dumpbin"
72       }
73 build_script:
74   - bash -c 'time ./configure $CONFIGOPTS'
75   - bash -c 'time make -j2' < nul
76 test_script:
77   - bash -c 'time make check VERBOSE=1' < nul