CI: use z1d instance for windows machine testing

This one has two local NVMe's attached so we should be able to use fast
local storage to hopefully speed the test up. The NVMe are not mounted
by default so we have to format and mount them. I have choosen Z as
drive letter as I guess it seems most likely that it is free.
Then we need to set the TMPDIR envs to make the machine tests use the
new location.

This speeds up hyperV tests by 20mins and wsl by 9 mins.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-03-25 11:23:08 +01:00
parent f5ab9d1530
commit 9b9c60d814
2 changed files with 25 additions and 1 deletions

View File

@ -802,7 +802,7 @@ podman_machine_windows_task:
depends_on: *build
ec2_instance:
<<: *windows
type: m5zn.metal
type: z1d.metal
platform: windows
timeout_in: 60m
env: *winenv
@ -812,6 +812,23 @@ podman_machine_windows_task:
- env:
TEST_FLAVOR: "machine-hyperv"
clone_script: *winclone
# This depends on an instance with an local NVMe storage so we can make use of fast IO
# Our machine tests are IO bound so this is rather imporant to speed them up a lot.
setup_disk_script: |
echo "Get-Disk"
Get-Disk | Ft -autosize | out-string -width 4096
# Hard coded to disk 0, assume that this is always the case for our ec2 instance.
# It is not clear to me how I would filter by name because we still have two disks
# with the same name.
echo "Format and mount disk 0"
$disk = Get-Disk 0
$disk | Initialize-Disk -PartitionStyle MBR
$disk | New-Partition -UseMaximumSize -MbrType IFS
$Partition = Get-Partition -DiskNumber $disk.Number
$Partition | Format-Volume -FileSystem NTFS -Confirm:$false
$Partition | Add-PartitionAccessPath -AccessPath "Z:\"
echo "Get-Volume"
Get-Volume
main_script: ".\\repo\\contrib\\cirrus\\win-podman-machine-main.ps1"
always:
# Required for `contrib/cirrus/logformatter` to work properly

View File

@ -33,5 +33,12 @@ Run-Command ".\bin\windows\podman.exe --version"
New-Item -ItemType "directory" -Path "$env:AppData\containers"
Copy-Item -Path pkg\machine\ocipull\policy.json -Destination "$env:AppData\containers"
# Set TMPDIR to fast storage, see cirrus.yml setup_disk_script for setup Z:\
# TMPDIR is used by the machine tests paths, while TMP and TEMP are the normal
# windows temporary dirs. Just to ensure everything uses the fast disk.
$Env:TMPDIR = 'Z:\'
$Env:TMP = 'Z:\'
$Env:TEMP = 'Z:\'
Write-Host "`nRunning podman-machine e2e tests"
Run-Command ".\winmake localmachine"