Skip to content

Commit b8f9e81

Browse files
committed
MDEV-41085 Enable MTR tests on Windows: rpl suite
1 parent fa1a479 commit b8f9e81

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: More MTR on Windows
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'bb-*'
8+
- '[0-9]+.[0-9]+'
9+
- '*wlad*'
10+
- '*elenst*'
11+
pull_request:
12+
13+
jobs:
14+
build:
15+
name: ${{ matrix.name }}
16+
17+
strategy:
18+
# Let both variants run to completion even if one of them fails
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- name: actions/win-rpl-small
23+
parallel: 8
24+
mtr_extra_args: '--suite=rpl'
25+
- name: actions/win-rpl-big-only
26+
parallel: 4
27+
mtr_extra_args: '--suite=rpl --big --big'
28+
29+
concurrency:
30+
# The matrix variant must be part of the group, otherwise
31+
# the two parallel jobs would cancel each other
32+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
33+
cancel-in-progress: true
34+
35+
runs-on: windows-2025
36+
37+
steps:
38+
39+
- name: Collect system information
40+
shell: pwsh
41+
run: |
42+
$cs = Get-CimInstance Win32_ComputerSystem
43+
$cpus = Get-CimInstance Win32_Processor
44+
$os = Get-CimInstance Win32_OperatingSystem
45+
46+
Write-Host "=== CPU ==="
47+
$cpus | ForEach-Object {
48+
Write-Host ("{0} | cores: {1} | logical processors: {2}" -f $_.Name.Trim(), $_.NumberOfCores, $_.NumberOfLogicalProcessors)
49+
}
50+
Write-Host ("Total logical processors: {0}" -f $cs.NumberOfLogicalProcessors)
51+
52+
Write-Host "`n=== Memory ==="
53+
Write-Host ("Total physical: {0:N2} GB" -f ($cs.TotalPhysicalMemory / 1GB))
54+
Write-Host ("Free physical: {0:N2} GB" -f ($os.FreePhysicalMemory * 1KB / 1GB))
55+
56+
Write-Host "`n=== Disks ==="
57+
Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" |
58+
Select-Object DeviceID, VolumeName,
59+
@{n='Size(GB)'; e={[math]::Round($_.Size / 1GB, 2)}},
60+
@{n='Free(GB)'; e={[math]::Round($_.FreeSpace / 1GB, 2)}} |
61+
Format-Table -AutoSize | Out-String | Write-Host
62+
63+
- name: Configure git
64+
run: |
65+
# We won't be able to successfully run mtr
66+
# unless we configure autocrlf.
67+
git config --global core.autocrlf input
68+
69+
- uses: actions/checkout@v6
70+
71+
- name: Install prerequisites
72+
run: |
73+
# Install bison to compile
74+
choco install winflexbison3
75+
76+
- name: Build
77+
run: |
78+
# speedup checkout by excluding uninteresting modules
79+
git config submodule.storage/columnstore/columnstore.update none
80+
git config submodule.storage/maria/libmarias3.update none
81+
git config submodule.storage/rocksdb/rocksdb.update none
82+
git config submodule.wsrep-lib.update none
83+
mkdir bld
84+
cd bld
85+
cmake .. -DWITH_SSL=bundled `
86+
-DPLUGIN_COLUMNSTORE=NO `
87+
-DPLUGIN_CONNECT=NO `
88+
-DPLUGIN_MROONGA=NO `
89+
-DPLUGIN_OQGRAPH=NO `
90+
-DPLUGIN_ROCKSDB=NO `
91+
-DPLUGIN_SPIDER=NO `
92+
-DPLUGIN_SPHINX=NO
93+
cmake --build . --config Debug --verbose -- -m
94+
95+
- name: Test MTR
96+
run: |
97+
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64"
98+
$parallel = ${{ matrix.parallel }}
99+
# Split extra options into an array; an empty value yields
100+
# no arguments at all when splatted below
101+
$extra = @("${{ matrix.mtr_extra_args }}" -split '\s+' | Where-Object { $_ })
102+
# create a directory to run tests in
103+
$tmp = (Get-Item $env:TEMP).FullName
104+
$tmp = $tmp -replace '\\','/'
105+
$cidir = "$tmp/ci"
106+
mkdir $cidir
107+
perl bld\mysql-test\mysql-test-run.pl `
108+
--force `
109+
--max-test-fail=0 `
110+
--parallel=$parallel `
111+
--vardir=$cidir/var `
112+
--verbose-restart `
113+
--retry=2 `
114+
@extra

0 commit comments

Comments
 (0)