forked from xapian/xapian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
112 lines (112 loc) · 5.51 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
112
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 2019
- TOOLCHAIN: mingw64
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- TOOLCHAIN: mingw64
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# We only test 64-bit cygwin as 32-bit support has been dropped as of
# Cygwin 3.4:
# https://cygwin.com/pipermail/cygwin/2022-November/252542.html
- TOOLCHAIN: cygwin
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- 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\""
- TOOLCHAIN: msvc
platform: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
VCVARS_BAT: "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\""
- TOOLCHAIN: msvc
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
VCVARS_BAT: "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\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 "mingw64") {
if ($env:Platform -eq "x86") {
$env:PATH="C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;C:\msys64\usr\bin;$env:PATH"
$env:CONFIGOPTS+=" --host=i686-pc-mingw32"
} else {
$env:PATH="C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
$env:CONFIGOPTS+=" --host=x86_64-w64-mingw32"
}
} elseif ($env:TOOLCHAIN -eq "cygwin") {
$env:PATH="C:\cygwin64\bin;$env:PATH"
$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"
}
- if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab"
- if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev'
- if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman -Sy --noconfirm zlib-devel'
# Work around odd ownership of directories in CI build image.
- if "%TOOLCHAIN%"=="cygwin" bash -c 'git config --global --add safe.directory /cygdrive/c/projects/xapian'
# 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%"=="cygwin" 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
- 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-data15.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