Skip to content

Commit ff4c2d5

Browse files
committed
Add QEMU on Windows to CI
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
1 parent df13f30 commit ff4c2d5

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

.github/workflows/test.yml

+36-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ jobs:
128128
run: sudo make uninstall
129129

130130
windows:
131-
name: "Windows tests"
132-
runs-on: windows-2022-8-cores
131+
name: "Windows tests (WSL2)"
132+
runs-on: windows-2025
133133
timeout-minutes: 30
134134
steps:
135135
- name: Enable WSL2
@@ -175,6 +175,40 @@ 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-2025
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 QEMU
199+
run: |
200+
winget install --silent --accept-source-agreements --accept-package-agreements --disable-interactivity SoftwareFreedomConservancy.QEMU
201+
- name: Integration tests (QEMU, Windows host)
202+
run: |
203+
$env:PATH = "$pwd\_output\bin;" + 'C:\msys64\usr\bin;' + 'C:\Program Files\QEMU;' + $env:PATH
204+
pacman -Sy --noconfirm openbsd-netcat diffutils
205+
$env:MSYS2_ENV_CONV_EXCL = 'HOME_HOST;HOME_GUEST;_LIMA_WINDOWS_EXTRA_PATH'
206+
$env:HOME_HOST = $(cygpath.exe "$env:USERPROFILE")
207+
$env:HOME_GUEST = "$env:HOME_HOST"
208+
$env:LIMACTL_CREATE_ARGS = '--vm-type=qemu'
209+
$env:_LIMA_WINDOWS_EXTRA_PATH = 'C:\Program Files\Git\usr\bin'
210+
bash.exe -c "./hack/test-templates.sh templates/default.yaml"
211+
178212
qemu:
179213
name: "Integration tests (QEMU, macOS host)"
180214
runs-on: macos-15-large # Intel

0 commit comments

Comments
 (0)