Skip to content

Commit 51c0388

Browse files
committed
Add QEMU on Windows to CI
For now it will use additional templates, because of incompatible mounts. Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
1 parent d851c78 commit 51c0388

File tree

3 files changed

+659
-1
lines changed

3 files changed

+659
-1
lines changed

.github/workflows/test.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
run: sudo make uninstall
129129

130130
windows:
131-
name: "Windows tests"
131+
name: "Windows tests (WSL2)"
132132
runs-on: windows-2022-8-cores
133133
timeout-minutes: 30
134134
steps:
@@ -175,6 +175,44 @@ jobs:
175175
$env:_LIMA_WINDOWS_EXTRA_PATH = 'C:\Program Files\Git\usr\bin'
176176
bash.exe -c "./hack/test-templates.sh templates/experimental/wsl2.yaml"
177177
178+
windows-qemu:
179+
name: "Windows tests (QEMU)"
180+
runs-on: windows-2022-8-cores
181+
timeout-minutes: 30
182+
steps:
183+
- name: Set gitconfig
184+
run: |
185+
git config --global core.autocrlf false
186+
git config --global core.eol lf
187+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
188+
with:
189+
# To avoid "can't parse builtin Lima version" errors
190+
fetch-depth: 0
191+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
192+
with:
193+
go-version: 1.24.x
194+
- name: Unit tests
195+
run: go test -v ./...
196+
- name: Make
197+
run: make
198+
- name: Install winget
199+
# TODO remove this step for Windows Server 2025 based runners
200+
# Pinned version, known to be working
201+
uses: Cyberboss/install-winget@1c6f189175e9f015bf1aa113cd1cc6c73efb9d47 # v1
202+
- name: Install QEMU
203+
run: |
204+
winget install --silent --accept-source-agreements --accept-package-agreements --disable-interactivity SoftwareFreedomConservancy.QEMU
205+
- name: Integration tests (QEMU, Windows host)
206+
run: |
207+
$env:PATH = "$pwd\_output\bin;" + 'C:\msys64\usr\bin;' + 'C:\Program Files\QEMU;' + $env:PATH
208+
pacman -Sy --noconfirm openbsd-netcat diffutils
209+
$env:MSYS2_ENV_CONV_EXCL = 'HOME_HOST;HOME_GUEST;_LIMA_WINDOWS_EXTRA_PATH'
210+
$env:HOME_HOST = $(cygpath.exe "$env:USERPROFILE")
211+
$env:HOME_GUEST = "$env:HOME_HOST"
212+
$env:LIMACTL_CREATE_ARGS = '--vm-type=qemu'
213+
$env:_LIMA_WINDOWS_EXTRA_PATH = 'C:\Program Files\Git\usr\bin'
214+
bash.exe -c "./hack/test-templates.sh templates/experimental/default-windows.yaml"
215+
178216
qemu:
179217
name: "Integration tests (QEMU, macOS host)"
180218
runs-on: macos-15-large # Intel
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mounts:
2+
- location: "~"
3+
- location: "C:\\Temp\\lima"
4+
mountPoint: /tmp/lima
5+
writable: true

0 commit comments

Comments
 (0)