Skip to content

Commit 0f7a7e9

Browse files
committed
ci: add Windows CI on GitHub Actions to replace Cirrus
Signed-off-by: Tim Zhou <tizhou@redhat.com>
1 parent 18acc61 commit 0f7a7e9

3 files changed

Lines changed: 255 additions & 0 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Windows / Installer
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '.github/workflows/windows-installer.yml'
8+
- 'winmake.ps1'
9+
- 'contrib/win-installer/**'
10+
- 'contrib/cirrus/win-*.ps1'
11+
push:
12+
branches: [main]
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
# Don't cancel post-merge runs on main; they're our ground-truth signal.
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
22+
jobs:
23+
installer:
24+
name: installer (${{ matrix.provider }})
25+
runs-on: windows-2025-vs2026
26+
timeout-minutes: 60
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
provider: [hyperv, wsl]
31+
env:
32+
PROVIDER: ${{ matrix.provider }}
33+
steps:
34+
- name: Configure git line endings
35+
shell: pwsh
36+
run: |
37+
git config --global core.autocrlf false
38+
git config --global core.eol lf
39+
40+
- name: Checkout
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
with:
43+
persist-credentials: false
44+
45+
- name: Set up Go
46+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
47+
with:
48+
go-version-file: go.mod
49+
cache: true
50+
51+
- name: Install build dependencies
52+
shell: pwsh
53+
run: |
54+
dotnet tool install --global wix --version 5.0.2
55+
choco install -y pandoc
56+
57+
- name: Build podman
58+
shell: pwsh
59+
run: |
60+
.\winmake.ps1 podman-remote
61+
.\bin\windows\podman.exe --version
62+
63+
- name: Fetch gvproxy
64+
shell: pwsh
65+
run: .\winmake.ps1 win-gvproxy
66+
67+
- name: Build docs
68+
shell: pwsh
69+
run: .\winmake.ps1 docs
70+
71+
- name: Build MSI (current version)
72+
shell: pwsh
73+
run: .\winmake.ps1 installer
74+
75+
- name: Build MSI (next version 9.9.9)
76+
shell: pwsh
77+
run: .\winmake.ps1 installer 9.9.9
78+
79+
- name: Run installer test
80+
shell: pwsh
81+
run: .\winmake.ps1 installertest $env:PROVIDER
82+
83+
- name: Upload artifacts
84+
if: always()
85+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
86+
with:
87+
name: installer-${{ matrix.provider }}-diag
88+
path: |
89+
contrib/win-installer/*.msi
90+
contrib/win-installer/*.log
91+
if-no-files-found: warn
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Windows / Machine
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '.github/workflows/windows-machine.yml'
8+
- 'winmake.ps1'
9+
- 'contrib/cirrus/win-*.ps1'
10+
- 'pkg/machine/**'
11+
push:
12+
branches: [main]
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
# Don't cancel post-merge runs on main; they're our ground-truth signal.
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
22+
jobs:
23+
machine:
24+
name: machine (${{ matrix.provider }})
25+
runs-on: windows-2025-vs2026
26+
timeout-minutes: 60
27+
continue-on-error: ${{ matrix.provider == 'wsl' }}
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
provider: [hyperv, wsl]
32+
env:
33+
CONTAINERS_MACHINE_PROVIDER: ${{ matrix.provider }}
34+
steps:
35+
- name: Configure git line endings
36+
shell: pwsh
37+
run: |
38+
git config --global core.autocrlf false
39+
git config --global core.eol lf
40+
41+
- name: Checkout
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
with:
44+
persist-credentials: false
45+
46+
- name: Set up Go
47+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
48+
with:
49+
go-version-file: go.mod
50+
cache: true
51+
52+
- name: Diagnostics
53+
shell: pwsh
54+
run: |
55+
Get-ComputerInfo | Select-Object OsName, OsVersion, CsProcessors, CsNumberOfLogicalProcessors, CsTotalPhysicalMemory | Format-List
56+
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V | Format-List
57+
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor | Format-List
58+
Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform | Format-List
59+
Get-CimInstance Win32_Processor | Select-Object Name, VirtualizationFirmwareEnabled, VMMonitorModeExtensions | Format-List
60+
Get-Disk | Format-Table -AutoSize
61+
62+
- name: Build podman
63+
shell: pwsh
64+
run: |
65+
.\winmake.ps1 podman-remote
66+
.\bin\windows\podman.exe --version
67+
68+
- name: Fetch gvproxy
69+
shell: pwsh
70+
run: .\winmake.ps1 win-gvproxy
71+
72+
- name: WSL info
73+
if: matrix.provider == 'wsl'
74+
shell: pwsh
75+
run: |
76+
wsl --update
77+
wsl --version
78+
wsl --status
79+
80+
- name: Run machine e2e
81+
shell: pwsh
82+
run: .\winmake.ps1 localmachine
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Windows / Tests
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '.github/workflows/windows-tests.yml'
8+
- 'winmake.ps1'
9+
- 'contrib/cirrus/win-*.ps1'
10+
- '**/*_test.go'
11+
- '**/*.go'
12+
- 'go.mod'
13+
- 'go.sum'
14+
push:
15+
branches: [main]
16+
17+
permissions:
18+
contents: read
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
# Don't cancel post-merge runs on main; they're our ground-truth signal.
23+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
24+
25+
jobs:
26+
localunit:
27+
name: localunit
28+
runs-on: windows-2025-vs2026
29+
timeout-minutes: 20
30+
steps:
31+
- name: Configure git line endings
32+
shell: pwsh
33+
run: |
34+
git config --global core.autocrlf false
35+
git config --global core.eol lf
36+
37+
- name: Checkout
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39+
with:
40+
persist-credentials: false
41+
42+
- name: Set up Go
43+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
44+
with:
45+
go-version-file: go.mod
46+
cache: true
47+
48+
- name: Run unit tests
49+
shell: pwsh
50+
run: .\winmake.ps1 localunit
51+
52+
ginkgo:
53+
name: ginkgo (non-machine e2e)
54+
runs-on: windows-2025-vs2026
55+
timeout-minutes: 20
56+
steps:
57+
- name: Configure git line endings
58+
shell: pwsh
59+
run: |
60+
git config --global core.autocrlf false
61+
git config --global core.eol lf
62+
63+
- name: Checkout
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
65+
with:
66+
persist-credentials: false
67+
68+
- name: Set up Go
69+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
70+
with:
71+
go-version-file: go.mod
72+
cache: true
73+
74+
- name: Build podman
75+
shell: pwsh
76+
run: |
77+
.\winmake.ps1 podman-remote
78+
.\bin\windows\podman.exe --version
79+
80+
- name: Run non-machine e2e tests
81+
shell: pwsh
82+
run: .\winmake.ps1 ginkgo-run

0 commit comments

Comments
 (0)