|
6 | 6 | - 'main' |
7 | 7 | - 'bb-*' |
8 | 8 | - '[0-9]+.[0-9]+' |
| 9 | + - '*wlad*' |
9 | 10 | pull_request: |
10 | 11 |
|
11 | 12 | jobs: |
|
27 | 28 |
|
28 | 29 | - name: Install bison |
29 | 30 | run: | |
30 | | - choco install winflexbison3 |
| 31 | + choco install winflexbison3 wixtoolset |
31 | 32 |
|
32 | 33 | - name: Build |
33 | 34 | run: | |
|
40 | 41 | cd bld |
41 | 42 | cmake .. -DWITH_SSL=bundled |
42 | 43 | cmake --build . --config RelWithDebinfo --verbose -- -m |
43 | | - cmake --build . --config RelWithDebInfo --target win_package_zip |
| 44 | + cmake --build . --config RelWithDebInfo --target MSI |
44 | 45 |
|
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 |
46 | 91 | run: | |
47 | 92 | $env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64" |
48 | 93 | #Calculate parallel as 4 * number of processors |
|
52 | 97 | --testcase-timeout=10 --suite=main,unit --skip-test=unit.my_tzinfo ` |
53 | 98 | --mysqld=--loose-innodb-flush-log-at-trx-commit=2 |
54 | 99 |
|
55 | | - - name: Test sequential |
| 100 | + - name: Test MTR non-parallel |
56 | 101 | # tests that can't run in parallel |
57 | 102 | run: | |
58 | 103 | $env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64" |
|
0 commit comments