From 9b9c60d814a6a822fcbc6a477f0df1936cb0a742 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 25 Mar 2025 11:23:08 +0100 Subject: [PATCH] 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 --- .cirrus.yml | 19 ++++++++++++++++++- contrib/cirrus/win-podman-machine-test.ps1 | 7 +++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index e4edb22a4a..eefed89ac4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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 diff --git a/contrib/cirrus/win-podman-machine-test.ps1 b/contrib/cirrus/win-podman-machine-test.ps1 index 965163b6a5..6ef782033f 100644 --- a/contrib/cirrus/win-podman-machine-test.ps1 +++ b/contrib/cirrus/win-podman-machine-test.ps1 @@ -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"