forked from xapian/xapian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
111 lines (111 loc) · 5.09 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
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
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
- TOOLCHAIN: mingw64
platform: x86
- TOOLCHAIN: mingw64
platform: x64
# Fails trying to run apitest.exe etc for unknown reasons.
# - TOOLCHAIN: cygwin
# platform: x86
- TOOLCHAIN: cygwin
platform: x64
- 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\""
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" bash -c 'mingw-get install libz-dev'
- if "%TOOLCHAIN%"=="mingw64" 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" 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" 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 -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 -L https://github.com/xapian/xapian-dev-deps/releases/download/current/zlib-1.2.11.tar.gz|tar --strip-components=1 -zxf -'
- 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 https://oligarchy.co.uk/xapian/patches/unicode-data12.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