Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 219 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
name: Windows

on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/windows.yml'
- 'winmake.ps1'
- 'contrib/cirrus/win-*.ps1'
- 'contrib/win-installer/**'
- 'pkg/machine/**'
- '**/*.go'
- 'go.mod'
- 'go.sum'
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
localunit:
name: localunit
runs-on: windows-2025-vs2026
timeout-minutes: 20
steps:
- name: Configure git line endings
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true

- name: Run unit tests
shell: pwsh
run: .\winmake.ps1 localunit

ginkgo:
name: ginkgo (non-machine e2e)
runs-on: windows-2025-vs2026
timeout-minutes: 20
steps:
- name: Configure git line endings
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true

- name: Build podman
shell: pwsh
run: |
.\winmake.ps1 podman-remote
.\bin\windows\podman.exe --version

- name: Run non-machine e2e tests
shell: pwsh
run: .\winmake.ps1 ginkgo-run

installer:
name: installer (${{ matrix.provider }})
runs-on: windows-2025-vs2026
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
provider: [hyperv, wsl]
env:
PROVIDER: ${{ matrix.provider }}
steps:
- name: Configure git line endings
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true

- name: Install build dependencies
shell: pwsh
run: |
dotnet tool install --global wix --version 5.0.2
choco install -y pandoc

- name: Build podman
shell: pwsh
run: |
.\winmake.ps1 podman-remote
.\bin\windows\podman.exe --version

- name: Fetch gvproxy
shell: pwsh
run: .\winmake.ps1 win-gvproxy

- name: Build docs
shell: pwsh
run: .\winmake.ps1 docs

- name: Build MSI (current version)
shell: pwsh
run: .\winmake.ps1 installer

- name: Build MSI (next version 9.9.9)
shell: pwsh
run: .\winmake.ps1 installer 9.9.9

- name: Run installer test
shell: pwsh
run: .\winmake.ps1 installertest $env:PROVIDER

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: installer-${{ matrix.provider }}-diag
path: |
contrib/win-installer/*.msi
contrib/win-installer/*.log
if-no-files-found: warn

machine:
name: machine (${{ matrix.provider }})
runs-on: windows-2025-vs2026
timeout-minutes: 60
continue-on-error: true
strategy:
fail-fast: false
matrix:
provider: [hyperv, wsl]
env:
CONTAINERS_MACHINE_PROVIDER: ${{ matrix.provider }}
steps:
- name: Configure git line endings
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true

- name: Diagnostics
shell: pwsh
run: |
Get-ComputerInfo | Select-Object OsName, OsVersion, CsProcessors, CsNumberOfLogicalProcessors, CsTotalPhysicalMemory | Format-List
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V | Format-List
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor | Format-List
Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform | Format-List
Get-CimInstance Win32_Processor | Select-Object Name, VirtualizationFirmwareEnabled, VMMonitorModeExtensions | Format-List
Get-Disk | Format-Table -AutoSize

- name: Build podman
shell: pwsh
run: |
.\winmake.ps1 podman-remote
.\bin\windows\podman.exe --version

- name: Fetch gvproxy
shell: pwsh
run: .\winmake.ps1 win-gvproxy

- name: WSL info
if: matrix.provider == 'wsl'
shell: pwsh
run: |
wsl --update
wsl --version
wsl --status

- name: Configure container policy
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path "$env:AppData\containers" | Out-Null
Copy-Item -Path pkg\machine\ocipull\policy.json -Destination "$env:AppData\containers"

- name: Run machine e2e
shell: pwsh
run: .\winmake.ps1 localmachine
Loading