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"
@@ -66,38 +58,19 @@ jobs:
6658 - name : Install patch
6759 run : |
6860 ridk exec pacman --needed --noconfirm --sync patch
69- - name : Detect MariaDB version
61+ - name : Set MariaDB version
7062 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}" | `
63+ Write-Output "MARIADB_VERSION=11.4" | `
8164 Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
82- - name : Cache MariaDB archive
83- uses : actions/cache @v4
65+ - name : Clone MariaDB from source
66+ uses : actions/checkout @v4
8467 with :
85- path : download/
86- key : download-mariadb-${{ env.MARIADB_VERSION }}
87- - name : Download MariaDB
68+ repository : MariaDB/server
69+ ref : 11.4
70+ path : mariadb
71+ submodules : recursive
72+ - name : Remove existing mroonga storage
8873 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
10174 Remove-Item mariadb\storage\mroonga -Recurse -Force
10275 - uses : actions/checkout@v4
10376 with :
@@ -106,30 +79,9 @@ jobs:
10679 - name : Set environment variables
10780 run : |
10881 $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- }
82+ $testDirName = "mariadb-test"
12783 Write-Output "MROONGA_VERSION=${mroongaVersion}" | `
12884 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
13385 Write-Output "TEST_DIR_NAME=${testDirName}" | `
13486 Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
13587 - uses : actions/cache@v4
@@ -153,29 +105,18 @@ jobs:
153105 storage\mroonga\packages\source\patches\mariadb-10.5.5-add-a-missing-export-symbol.diff
154106 Copy-Item storage\mroonga\build\mroonga_windows.cmake cmake\build_configurations\
155107 - uses : actions/checkout@v4
156- if : |
157- matrix.use-main == 'yes'
158108 with :
159109 path : mariadb/extra/groonga
160110 repository : groonga/groonga
161111 submodules : recursive
162112 - name : Prepare Groonga
163113 run : |
164114 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- }
115+ pushd extra\groonga\vendor
116+ ruby download_mecab.rb
117+ ruby download_xxhash.rb
118+ ruby download.rb
119+ popd
179120 Remove-Item extra\groonga\test -Recurse -Force
180121 cd extra\groonga\vendor\mruby-source
181122 Invoke-WebRequest `
@@ -191,24 +132,10 @@ jobs:
191132 path : mariadb/extra/groonga-normalizer-mysql
192133 repository : groonga/groonga-normalizer-mysql
193134 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
207135 - name : Run CMake
208136 shell : cmd
209137 run : |
210138 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
212139 cmake ^
213140 -S mariadb ^
214141 -B build ^
@@ -217,9 +144,6 @@ jobs:
217144 -DCMAKE_INSTALL_PREFIX=install ^
218145 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^
219146 -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' }} ^
223147 -DGRN_WITH_MRUBY=ON ^
224148 -DGRN_WITH_WINDOWS_BACK_TRACE=OFF ^
225149 -DGRN_WITH_XSIMD=no || exit /B
@@ -234,39 +158,6 @@ jobs:
234158 --target install ^
235159 --verbose || exit /B
236160 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
270161
271162 - name : Test
272163 run : |
@@ -281,18 +172,3 @@ jobs:
281172 --parallel=${Env:NUMBER_OF_PROCESSORS} `
282173 --retry=3 `
283174 --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