-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
85 lines (85 loc) · 3.96 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
skip_tags: true
# A full clone takes 30 seconds, depth 20 takes 5 seconds.
#
# Using "shallow_clone: true" downloads the commit as a ZIP file so you might
# think that would be quicker still, but actually it seems to take ~15 seconds,
# and then bootstrap fails due to there not being a ".git" directory.
clone_depth: 20
# Specify clone_folder so we can hard-code the Unix path equivalent below.
clone_folder: c:\projects\xapian
environment:
global:
AUTOMATED_TESTING: 1
matrix:
# Disable for now as package download is currently failing most of the time with:
#
# mingw-get.exe: *** ERROR *** http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz:cannot open URL; status = 12002
#
# or:
#
# mingw-get.exe: *** ERROR *** Get package: http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz: download failed
# mingw-get.exe: *** WARNING *** http://osdn.net/dl/mingw/libz-1.2.11-1-mingw32-dev.tar.xz: opened with unexpected status: code = 500
#
# - TOOLCHAIN: mingw
# platform: x86
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- TOOLCHAIN: msvc
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86"
- TOOLCHAIN: msvc
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x64"
- TOOLCHAIN: msvc
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
- TOOLCHAIN: msvc
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
install:
- ps: >-
$env:CONFIGOPTS="--disable-documentation"
- ps: >-
if ($env:TOOLCHAIN -eq "mingw") {
$env:PATH="C:\Mingw\bin;C:\Mingw\MSYS\1.0\bin;$env:PATH"
} elseif ($env:TOOLCHAIN -eq "llvm") {
$env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH"
} else {
$env:PATH="c:\msys64\usr\bin;$env:PATH"
}
- if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
- if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev'
- bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core'
- if defined VCVARS_BAT call %VCVARS_BAT%
- if "%TOOLCHAIN%"=="msvc" mkdir zlib
- if "%TOOLCHAIN%"=="msvc" cd zlib
- 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 -'
# Don't build zlib with -MD as it seems this flag needs to be used
# consistently across the build.
- if "%TOOLCHAIN%"=="msvc" sed -i 's/\(^CFLAGS *= *-nologo \)-MD /\1/' win32/Makefile.msc
# Don't build zlib with a fixed base address on x64 as that gives linker
# warning LNK4281.
- if "%TOOLCHAIN%-%Platform%"=="msvc-x64" sed -i 's/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
- if "%TOOLCHAIN%"=="msvc" nmake -nologo -f win32\Makefile.msc
- if "%TOOLCHAIN%"=="msvc" cd ..
# Fetch pre-built unicode-data.cc to avoid having to get working tclsh.
- curl --retry 5 --retry-connrefused https://oligarchy.co.uk/xapian/patches/unicode-data.cc > xapian-core\unicode\unicode-data.cc
- ps: >-
if ($env:TOOLCHAIN -eq "msvc") {
$env:CC="cl -nologo"
$env:CXX="c:/projects/xapian/INST/share/automake-1.16/compile cl -nologo"
$env:CXXFLAGS="-EHsc"
$env:CPPFLAGS="-Ic:/projects/xapian/zlib"
$env:AR="lib"
$env:LD="link"
$env:LDFLAGS="-Lc:/projects/xapian/zlib"
$env:NM="dumpbin"
}
build_script:
- bash -c 'time ./configure $CONFIGOPTS'
- bash -c 'time make -j2' < nul
test_script:
- bash -c 'time make check VERBOSE=1' < nul