forked from groonga/groonga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
196 lines (187 loc) · 8.43 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
notifications:
- provider: Webhook
url: https://webhook.commit-email.info/
version: "{build}"
clone_depth: 10
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: 15
ARCH: amd64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VS_VERSION: 14
ARCH: amd64
- VS_VERSION: 12
ARCH: amd64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: 15
ARCH: x86
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VS_VERSION: 14
ARCH: x86
- VS_VERSION: 12
ARCH: x86
# matrix:
# allow_failures:
# - VS_VERSION: 12
# ARCH: x86
init:
- ps: Set-WinSystemLocale ja-JP
- ps: Start-Sleep -s 10
- ps: Restart-Computer
install:
- set PATH=C:\Ruby25-x64\bin;%PATH%
- set PATH=C:\msys64\usr\bin;%PATH%
- choco install -y curl 7zip.commandline
- if "%VS_VERSION%" == "15" if "%ARCH%" == "x86" set VS2017_X86=TRUE
- if "%VS_VERSION%" == "15" if "%ARCH%" == "amd64" set VS2017_AMD64=TRUE
- if "%VS2017_X86%" == "TRUE"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- if "%VS2017_AMD64%" == "TRUE"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- if not "%VS_VERSION%" == "15"
call
"C:\Program Files (x86)\Microsoft Visual Studio %VS_VERSION%.0\VC\vcvarsall.bat"
%ARCH%
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- tzutil /s "Tokyo Standard Time"
# - choco install -y imdisk-toolkit
# - mkdir tmp
# - imdisk -a -t file -m tmp -o awe -s 1G -p "/fs:ntfs /q /y"
- set GROONGA_INSTALL_SUB_FOLDER=インストール
#- set GROONGA_INSTALL_SUB_FOLDER=install
- ps: |
$Env:GROONGA_VERSION = (Get-Content base_version)
if ($Env:APPVEYOR_REPO_TAG -eq "false") {
$Env:GROONGA_VERSION += "-" + $Env:APPVEYOR_REPO_COMMIT.Substring(0, 7)
}
$Env:GROONGA_INSTALL_FOLDER = "groonga-" + $Env:GROONGA_VERSION
if ($Env:ARCH -eq "x86") {
$Env:GROONGA_INSTALL_FOLDER += "-x86"
} else {
$Env:GROONGA_INSTALL_FOLDER += "-x64"
}
switch -Exact ($Env:VS_VERSION) {
"15" {
$Env:GROONGA_INSTALL_FOLDER += "-vs2017"
}
"14" {
$Env:GROONGA_INSTALL_FOLDER += "-vs2015"
}
"12" {
$Env:GROONGA_INSTALL_FOLDER += "-vs2013"
}
}
"GRN_VERSION=" + $Env:GROONGA_VERSION | Set-Content version.sh
$Env:FULL_GROONGA_INSTALL_FOLDER = $Env:APPVEYOR_BUILD_FOLDER + "\" + $Env:GROONGA_INSTALL_SUB_FOLDER + "\" + $Env:GROONGA_INSTALL_FOLDER
- curl -O http://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-latest.zip
- 7z x groonga-normalizer-mysql-latest.zip
- del groonga-normalizer-mysql-latest.zip
- move groonga-normalizer-mysql* vendor\plugins\groonga-normalizer-mysql
build_script:
- git submodule update --init
- cd vendor
- ruby download_mecab.rb
- ruby download_message_pack.rb
- ruby download_lz4.rb
- ruby download_rapidjson.rb
- cd ..
- set CMAKE_GENERATOR_NAME=Visual Studio %VS_VERSION%
- if "%VS_VERSION%" == "12"
set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2013
- if "%VS_VERSION%" == "14"
set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2015
- if "%VS_VERSION%" == "15"
set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2017
- if "%ARCH%" == "amd64"
set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64
- cmake . -G "%CMAKE_GENERATOR_NAME%"
-DCMAKE_INSTALL_PREFIX=%FULL_GROONGA_INSTALL_FOLDER%
-DGRN_WITH_MRUBY=yes
- set CMAKE_BUILD_PARALLEL_LEVEL=4
- cmake --build . --config RelWithDebInfo
- cmake --build . --config RelWithDebInfo --target Install
- move %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\html\admin %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\html\admin.old
- curl -O http://packages.groonga.org/source/groonga-admin/groonga-admin.tar.gz
- 7z x groonga-admin.tar.gz
- 7z x groonga-admin.tar
- cd groonga-admin-*
- move html %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\html\admin
# Install groonga-admin license files
- mkdir %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\groonga-admin
- for %%i in ( LICENSE README.md ) do ( copy %%i %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\groonga-admin\ )
# Install msgpack license files
- cd %APPVEYOR_BUILD_FOLDER%\vendor\msgpack-*
- copy NOTICE %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\msgpack\
- cd %APPVEYOR_BUILD_FOLDER%
before_test:
- git clone --depth 1
https://github.com/groonga/grntest.git
test\command\grntest
- cd test\command\grntest
- bundle install --binstubs=..\bin
- cd ..\..\..
- del test\command\suite\select\filter\equal\vector_element_float.test
test_script:
- set GRN_EXPR_OPTIMIZE=yes
- ruby test\command\bin\grntest
--groonga %FULL_GROONGA_INSTALL_FOLDER%\bin\groonga.exe
--base-directory test\command
--reporter mark
--n-workers 2
--timeout 60
--read-timeout 30
--n-retries 2
test\command\suite
# On AppVeyor, インストール directory is recognized unicode escape sequence.
- set GROONGA_INSTALL_SUB_FOLDER_ESCAPED=\u7E67\uFF64\u7E5D\uFF73\u7E67\uFF79\u7E5D\u533B\u30FB\u7E5D\uFF6B
- ruby test\command_line\run-test.rb
--groonga-install-prefix=%APPVEYOR_BUILD_FOLDER%\\%GROONGA_INSTALL_SUB_FOLDER_ESCAPED%\\%GROONGA_INSTALL_FOLDER%
# Enable this to debug on AppVeyor
# on_failure:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
on_finish:
- cd %GROONGA_INSTALL_SUB_FOLDER%
- set ARTIFACT=%GROONGA_INSTALL_FOLDER%.zip
- 7z a %ARTIFACT% %FULL_GROONGA_INSTALL_FOLDER%
- ps: Push-AppveyorArtifact $Env:ARTIFACT
- mkdir %FULL_GROONGA_INSTALL_FOLDER%\share\groonga\vcruntime
- if "%ARCH%" == "amd64" set ARCH=x64
- ps: |
switch -Exact ($Env:VS_VERSION) {
"15" {
$Env:REDIST_VERSION = (Get-Content "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt")
$Env:VCREDIST_DIR = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\$Env:REDIST_VERSION\$Env:ARCH"
$Env:VCREDIST_VCRUNTIME = "$Env:VCREDIST_DIR\Microsoft.VC141.CRT\vcruntime140.dll"
$Env:VCREDIST_MSVCP = "$Env:VCREDIST_DIR\Microsoft.VC141.CRT\msvcp140.dll"
$Env:LICENSE_FILE = $Env:APPVEYOR_BUILD_FOLDER + "\packages\windows\vcruntime\vs2017\readme.txt"
$Env:UCRT_REDIST_DIR = "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\$Env:ARCH"
$Env:UCRT_LICENSE_FILE = $Env:APPVEYOR_BUILD_FOLDER + "\packages\windows\vcruntime\ucrt-readme.txt"
}
"14" {
$Env:VCREDIST_DIR = "C:\Program Files (x86)\Microsoft Visual Studio $Env:VS_VERSION.0\VC\redist\$Env:ARCH"
$Env:VCREDIST_VCRUNTIME = "$Env:VCREDIST_DIR\Microsoft.VC140.CRT\vcruntime140.dll"
$Env:VCREDIST_MSVCP = "$Env:VCREDIST_DIR\Microsoft.VC140.CRT\msvcp140.dll"
$Env:LICENSE_FILE = $Env:APPVEYOR_BUILD_FOLDER + "\packages\windows\vcruntime\vs2015\readme.txt"
$Env:UCRT_REDIST_DIR = "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\$Env:ARCH"
$Env:UCRT_LICENSE_FILE = $Env:APPVEYOR_BUILD_FOLDER + "\packages\windows\vcruntime\ucrt-readme.txt"
}
"12" {
$Env:VCREDIST_DIR = "C:\Program Files (x86)\Microsoft Visual Studio $Env:VS_VERSION.0\VC\redist\$Env:ARCH"
$Env:VCREDIST_VCRUNTIME = "$Env:VCREDIST_DIR\Microsoft.VC120.CRT\msvcr120.dll"
$Env:VCREDIST_MSVCP = "$Env:VCREDIST_DIR\Microsoft.VC120.CRT\msvcp120.dll"
$Env:LICENSE_FILE = $Env:APPVEYOR_BUILD_FOLDER + "\packages\windows\vcruntime\vs2013\readme.txt"
}
}
- copy "%VCREDIST_VCRUNTIME%" "%FULL_GROONGA_INSTALL_FOLDER%\bin"
- copy "%VCREDIST_MSVCP%" "%FULL_GROONGA_INSTALL_FOLDER%\bin"
- copy "%LICENSE_FILE%" "%FULL_GROONGA_INSTALL_FOLDER%\share\groonga\vcruntime"
- ps: |
if ($Env:UCRT_REDIST_DIR) {
Copy-Item $Env:UCRT_REDIST_DIR\*.dll -Destination $Env:FULL_GROONGA_INSTALL_FOLDER\bin\
Copy-Item $Env:UCRT_LICENSE_FILE -Destination $Env:FULL_GROONGA_INSTALL_FOLDER\share\groonga\vcruntime\
}
- set ARTIFACT=%GROONGA_INSTALL_FOLDER%-with-vcruntime.zip
- 7z a %ARTIFACT% %FULL_GROONGA_INSTALL_FOLDER%
- ps: Push-AppveyorArtifact $Env:ARTIFACT
- cd ..