Skip to content

Commit 1130c10

Browse files
committed
build and test MSI
1 parent 322e4fd commit 1130c10

File tree

1 file changed

+49
-4
lines changed

1 file changed

+49
-4
lines changed

.github/workflows/windows-arm64.yml

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- 'main'
77
- 'bb-*'
88
- '[0-9]+.[0-9]+'
9+
- '*wlad*'
910
pull_request:
1011

1112
jobs:
@@ -27,7 +28,7 @@ jobs:
2728

2829
- name: Install bison
2930
run: |
30-
choco install winflexbison3
31+
choco install winflexbison3 wixtoolset
3132
3233
- name: Build
3334
run: |
@@ -40,9 +41,53 @@ jobs:
4041
cd bld
4142
cmake .. -DWITH_SSL=bundled
4243
cmake --build . --config RelWithDebinfo --verbose -- -m
43-
cmake --build . --config RelWithDebInfo --target win_package_zip
44+
cmake --build . --config RelWithDebInfo --target MSI
4445
45-
- name: Test
46+
- name: Test MSI
47+
shell: pwsh
48+
run: |
49+
# Find the MSI file
50+
$msi = Get-ChildItem -Recurse -Filter *.msi -Path bld\win\packaging | Select-Object -First 1
51+
52+
if (-not $msi) {
53+
Write-Error "No MSI file found in build directory"
54+
exit 1
55+
}
56+
# Define install parameters
57+
$msiPath = $msi.FullName
58+
$installDir = "C:\mariadb"
59+
$serviceName = "MariaDB"
60+
$rootPassword = "b1ctUj5rcRSADLC"
61+
62+
# Install MSI
63+
$installArgs = "/i `"$msiPath`" INSTALLDIR=`"$installDir`" SERVICE=$serviceName PASSWORD=$rootPassword /qn /norestart"
64+
Write-Host "Installing MSI: $msiPath"
65+
Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList $installArgs
66+
67+
# Run smoke test
68+
$mysqlExe = Join-Path $installDir "bin\mysql.exe"
69+
if (-Not (Test-Path $mysqlExe)) {
70+
Write-Error "mysql.exe not found at $mysqlExe"
71+
exit 1
72+
}
73+
& $mysqlExe -uroot "--password=$rootPassword" -e "select 1"
74+
if ($LASTEXITCODE -ne 0) {
75+
Write-Error "Smoke test failed"
76+
exit 1
77+
}
78+
# Get product code for uninstall
79+
$product = Get-WmiObject Win32_Product | Where-Object { $_.InstallLocation -eq $installDir } | Select-Object -First 1
80+
if (-not $product) {
81+
Write-Error "Could not determine MSI product for uninstall"
82+
exit 1
83+
}
84+
85+
$productCode = $product.IdentifyingNumber
86+
Write-Host "Uninstalling product code: $productCode"
87+
$uninstallArgs = "/x $productCode /qn /norestart"
88+
Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList $uninstallArgs
89+
90+
- name: Test MTR
4691
run: |
4792
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64"
4893
#Calculate parallel as 4 * number of processors
@@ -52,7 +97,7 @@ jobs:
5297
--testcase-timeout=10 --suite=main,unit --skip-test=unit.my_tzinfo `
5398
--mysqld=--loose-innodb-flush-log-at-trx-commit=2
5499
55-
- name: Test sequential
100+
- name: Test MTR non-parallel
56101
# tests that can't run in parallel
57102
run: |
58103
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64"

0 commit comments

Comments
 (0)