forked from xapian/xapian
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.appveyor.yml
More file actions
135 lines (135 loc) · 6.88 KB
/
.appveyor.yml
File metadata and controls
135 lines (135 loc) · 6.88 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
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:
- TOOLCHAIN: mingw
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- TOOLCHAIN: mingw64
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- TOOLCHAIN: mingw64
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# Fails trying to run apitest.exe etc for unknown reasons.
# - TOOLCHAIN: cygwin
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# platform: x86
- TOOLCHAIN: cygwin
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- 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"
# We get exit code 127 trying to run apitest.exe but no error message.
# Other test programs which link to libxapian fail too. unittest.exe OK.
# - 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\""
- TOOLCHAIN: msvc
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
- TOOLCHAIN: msvc
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VCVARS_BAT: "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\""
matrix:
allow_failures:
# mingw build currently sometimes fails due to trying to delete open files.
# It's unclear what the problem is, so until we manage to debug this allow
# this build to fail without flagging CI as having failed.
- TOOLCHAIN: mingw
platform: x86
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 "mingw64") {
if ($env:Platform -eq "x86") {
$env:PATH="C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;C:\msys64\usr\bin;$env:PATH"
$env:CONFIGOPTS+=" --host=i686-pc-mingw32"
} else {
$env:PATH="C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
$env:CONFIGOPTS+=" --host=x86_64-w64-mingw32"
}
} elseif ($env:TOOLCHAIN -eq "cygwin") {
# Use 64-bit cygwin install for 32 bit build too to avoid DLL mapping issues.
$env:PATH="C:\cygwin64\bin;$env:PATH"
if ($env:Platform -eq "x86") {
$env:CONFIGOPTS+=" --host=i686-pc-cygwin"
} else {
$env:CONFIGOPTS+=" --host=x86_64-pc-cygwin"
}
} 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"
}
- ps: >-
if ($env:TOOLCHAIN -ne "cygwin") {
$env:CONFIGOPTS+=" --disable-backend-honey"
}
- if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
- if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev'
# Workaround appveyor's container having old maintainer keys:
- if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz'
- if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig'
- if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig'
- if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz'
- if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman -Sy --noconfirm zlib-devel'
# Install cygwin git and patch packages since those installed in the image
# want the 32-bit cygwin1.dll which means they fail to work if the 64-bit
# cygwin1.dll is first on PATH.
- if "%TOOLCHAIN%-%Platform%"=="cygwin-x64" appveyor-retry 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
- if "%TOOLCHAIN%-%Platform%"=="cygwin-x86" appveyor-retry 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
- 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.11.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-data13.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:LDFLAGS="-Lc:/projects/xapian/zlib"
}
build_script:
- bash -c 'time ./configure $CONFIGOPTS'
- bash -c 'time make -j2' < nul
test_script:
- bash -c 'time make check VERBOSE=1' < nul