Skip to content

Commit ca85830

Browse files
committed
debug: build Mroonga with latest MariaDB v11.4
JIRA: https://jira.mariadb.org/browse/MDEV-36904
1 parent 06d035b commit ca85830

File tree

1 file changed

+20
-141
lines changed

1 file changed

+20
-141
lines changed

.github/workflows/windows.yml

Lines changed: 20 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
include:
40-
- mariadb-release: "10.5"
41-
- mariadb-release: "10.6"
42-
- mariadb-release: "10.11"
4340
- mariadb-release: "11.4"
44-
- mariadb-release: "11.4"
45-
use-main: "yes"
46-
- mariadb-release: "11.4"
47-
use-main: "yes"
48-
embed: "ON"
4941
env:
5042
PACKAGE_PLATFORM: "winx64"
5143
VC_ARCHITECTURE: "x64"
@@ -63,41 +55,25 @@ jobs:
6355
run: |
6456
Set-TimeZone -Id "Tokyo Standard Time"
6557
- uses: actions/setup-ruby@v1
66-
- name: Install patch
58+
- name: Install build dependencies
59+
run: |
60+
ridk exec pacman --needed --noconfirm --sync patch bison flex curl bzip2 lz4 xz snappy
61+
- name: Install winflexbison
6762
run: |
68-
ridk exec pacman --needed --noconfirm --sync patch
69-
- name: Detect MariaDB version
63+
choco install winflexbison3
64+
- name: Set MariaDB version
7065
run: |
71-
$releasesResponse = `
72-
Invoke-WebRequest `
73-
-Uri "https://downloads.mariadb.org/rest-api/mariadb/${{ matrix.mariadb-release }}/" `
74-
-Verbose | `
75-
ConvertFrom-Json
76-
$latestRelease = (($releasesResponse.releases | `
77-
Get-Member -MemberType NoteProperty).Name | `
78-
Sort-Object -Property {[Version]$_})[-1]
79-
$mariaDBVersion = $latestRelease
80-
Write-Output "MARIADB_VERSION=${mariaDBVersion}" | `
66+
Write-Output "MARIADB_VERSION=11.4" | `
8167
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
82-
- name: Cache MariaDB archive
83-
uses: actions/cache@v4
68+
- name: Clone MariaDB from source
69+
uses: actions/checkout@v4
8470
with:
85-
path: download/
86-
key: download-mariadb-${{ env.MARIADB_VERSION }}
87-
- name: Download MariaDB
71+
repository: MariaDB/server
72+
ref: 11.4
73+
path: mariadb
74+
submodules: recursive
75+
- name: Remove existing mroonga storage
8876
run: |
89-
$mariadbTarGz = "download\mariadb-${Env:MARIADB_VERSION}.tar.gz"
90-
if (-not(Test-Path -Path ${mariadbTarGz})) {
91-
New-Item download -ItemType Directory -Force
92-
Invoke-WebRequest `
93-
-Uri "https://downloads.mariadb.org/rest-api/mariadb/${Env:MARIADB_VERSION}/mariadb-${Env:MARIADB_VERSION}.tar.gz" `
94-
-OutFile ${mariadbTarGz} `
95-
-Verbose
96-
}
97-
# Workaround for: https://jira.mariadb.org/browse/MDEV-33493
98-
ridk exec tar xzf "${mariadbTarGz}" `
99-
--exclude=storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result
100-
Move-Item mariadb-${Env:MARIADB_VERSION} mariadb
10177
Remove-Item mariadb\storage\mroonga -Recurse -Force
10278
- uses: actions/checkout@v4
10379
with:
@@ -106,30 +82,9 @@ jobs:
10682
- name: Set environment variables
10783
run: |
10884
$mroongaVersion = "$(Get-Content mariadb\storage\mroonga\version_full)"
109-
$artifactName = "mariadb-${Env:MARIADB_VERSION}-with-mroonga-${mroongaVersion}"
110-
if ("${{ matrix.use-main }}" -eq "yes") {
111-
$artifactName += "-with-groonga-main"
112-
}
113-
if ("${{ matrix.embed }}" -eq "ON") {
114-
$artifactName += "-embed"
115-
}
116-
$artifactName += "-${Env:PACKAGE_PLATFORM}"
117-
if ("${{ matrix.use-main }}" -eq "yes") {
118-
$uploadArtifactName = $artifactName;
119-
} else {
120-
$uploadArtifactName = "release-" + $artifactName;
121-
}
122-
if ("${Env:MARIADB_VERSION}" -match "^10\.*") {
123-
$testDirName = "mysql-test"
124-
} else {
125-
$testDirName = "mariadb-test"
126-
}
85+
$testDirName = "mariadb-test"
12786
Write-Output "MROONGA_VERSION=${mroongaVersion}" | `
12887
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
129-
Write-Output "ARTIFACT_NAME=${artifactName}" | `
130-
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
131-
Write-Output "UPLOAD_ARTIFACT_NAME=${uploadArtifactName}" | `
132-
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
13388
Write-Output "TEST_DIR_NAME=${testDirName}" | `
13489
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
13590
- uses: actions/cache@v4
@@ -153,29 +108,18 @@ jobs:
153108
storage\mroonga\packages\source\patches\mariadb-10.5.5-add-a-missing-export-symbol.diff
154109
Copy-Item storage\mroonga\build\mroonga_windows.cmake cmake\build_configurations\
155110
- uses: actions/checkout@v4
156-
if: |
157-
matrix.use-main == 'yes'
158111
with:
159112
path: mariadb/extra/groonga
160113
repository: groonga/groonga
161114
submodules: recursive
162115
- name: Prepare Groonga
163116
run: |
164117
cd mariadb
165-
if ("${{ matrix.use-main }}" -eq "yes") {
166-
pushd extra\groonga\vendor
167-
ruby download_mecab.rb
168-
ruby download_xxhash.rb
169-
ruby download.rb
170-
popd
171-
} else {
172-
Invoke-WebRequest `
173-
-Uri "https://packages.groonga.org/source/groonga/groonga-latest.zip" `
174-
-OutFile groonga-latest.zip
175-
Expand-Archive groonga-latest.zip .
176-
Remove-Item groonga-latest.zip
177-
Move-Item groonga-* extra\groonga
178-
}
118+
pushd extra\groonga\vendor
119+
ruby download_mecab.rb
120+
ruby download_xxhash.rb
121+
ruby download.rb
122+
popd
179123
Remove-Item extra\groonga\test -Recurse -Force
180124
cd extra\groonga\vendor\mruby-source
181125
Invoke-WebRequest `
@@ -191,24 +135,10 @@ jobs:
191135
path: mariadb/extra/groonga-normalizer-mysql
192136
repository: groonga/groonga-normalizer-mysql
193137
submodules: recursive
194-
- name: Download groonga-normalizer-mysql latest
195-
if: |
196-
matrix.use-main != 'yes'
197-
run: |
198-
cd mariadb
199-
Invoke-WebRequest `
200-
-Uri "https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-latest.zip" `
201-
-OutFile groonga-normalizer-mysql-latest.zip
202-
Expand-Archive groonga-normalizer-mysql-latest.zip .
203-
Remove-Item groonga-normalizer-mysql-latest.zip
204-
Move-Item `
205-
groonga-normalizer-mysql-* `
206-
extra\groonga-normalizer-mysql
207138
- name: Run CMake
208139
shell: cmd
209140
run: |
210141
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCHITECTURE% || exit /B
211-
# -DINSTALL_RUNTIME_DEPENDENCIES_DEFAULT=OFF is workaround for: https://jira.mariadb.org/browse/MDEV-36904
212142
cmake ^
213143
-S mariadb ^
214144
-B build ^
@@ -217,9 +147,6 @@ jobs:
217147
-DCMAKE_INSTALL_PREFIX=install ^
218148
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^
219149
-DCONNECT_WITH_LIBXML2=OFF ^
220-
-DINSTALL_RUNTIME_DEPENDENCIES_DEFAULT=OFF ^
221-
-DMRN_GROONGA_EMBED=${{ matrix.embed || 'OFF' }} ^
222-
-DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=${{ matrix.embed || 'OFF' }} ^
223150
-DGRN_WITH_MRUBY=ON ^
224151
-DGRN_WITH_WINDOWS_BACK_TRACE=OFF ^
225152
-DGRN_WITH_XSIMD=no || exit /B
@@ -234,39 +161,6 @@ jobs:
234161
--target install ^
235162
--verbose || exit /B
236163
ccache --show-stats --verbose
237-
- name: Create package
238-
shell: cmd
239-
run: |
240-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCHITECTURE% || exit /B
241-
set CMAKE_BUILD_PARALLEL_LEVEL=%NUMBER_OF_PROCESSORS%
242-
cmake ^
243-
--build build ^
244-
--config RelWithDebInfo ^
245-
--target package ^
246-
--verbose || exit /B
247-
ccache --show-stats --verbose
248-
- name: Prepare package
249-
run: |
250-
pushd build
251-
Expand-Archive `
252-
mariadb-${Env:MARIADB_VERSION}-${Env:PACKAGE_PLATFORM}.zip `
253-
.
254-
pushd mariadb-${Env:MARIADB_VERSION}-${Env:PACKAGE_PLATFORM}
255-
Remove-Item ${Env:TEST_DIR_NAME} -Recurse -Force
256-
popd
257-
Move-Item `
258-
mariadb-${Env:MARIADB_VERSION}-${Env:PACKAGE_PLATFORM} `
259-
..\
260-
popd
261-
Compress-Archive `
262-
-Path mariadb-${Env:MARIADB_VERSION}-${Env:PACKAGE_PLATFORM} `
263-
-DestinationPath "${Env:ARTIFACT_NAME}.zip"
264-
265-
# Artifact
266-
- uses: actions/upload-artifact@v4
267-
with:
268-
name: ${{ env.UPLOAD_ARTIFACT_NAME }}
269-
path: ${{ env.ARTIFACT_NAME }}.zip
270164
271165
- name: Test
272166
run: |
@@ -281,18 +175,3 @@ jobs:
281175
--parallel=${Env:NUMBER_OF_PROCESSORS} `
282176
--retry=3 `
283177
--suite=$($suites -join ",")
284-
285-
- name: "Test: reference count"
286-
run: |
287-
cd install\${Env:TEST_DIR_NAME}
288-
$suites = `
289-
Get-ChildItem -Recurse -Directory -Name t plugin\mroonga | `
290-
Split-Path -Parent | `
291-
% {$_.replace("\", "/")}
292-
perl mysql-test-run.pl `
293-
--force `
294-
--mysqld=--loose-plugin-mroonga-enable-reference-count=ON `
295-
--no-check-testcases `
296-
--parallel=${Env:NUMBER_OF_PROCESSORS} `
297-
--retry=3 `
298-
--suite=$($suites -join ",")

0 commit comments

Comments
 (0)