Skip to content

Commit e138304

Browse files
Merge pull request #26089 from l0rd/release-win-arm64-artifacts
Release win arm64 artifacts
2 parents ec9406a + 136f2e1 commit e138304

File tree

5 files changed

+41
-10
lines changed

5 files changed

+41
-10
lines changed

.github/workflows/release.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ jobs:
144144
145145
windows-installer:
146146
name: Build Windows Installer
147+
strategy:
148+
matrix:
149+
arch: [amd64, arm64]
147150
runs-on: windows-latest
148151
needs: [check, build-artifacts]
149152
env:
@@ -198,13 +201,29 @@ jobs:
198201
}
199202
Pop-Location
200203
Exit $code
201-
- name: Display structure of downloaded files
204+
env:
205+
PODMAN_ARCH: ${{ matrix.arch }}
206+
- name: Display structure of built files
202207
run: |
203208
Push-Location contrib\win-installer
204209
Get-ChildItem
205210
Pop-Location
206-
- name: Artifact
211+
- name: Rename the installer
212+
run: |
213+
Push-Location contrib\win-installer
214+
Copy-Item -Path podman-${{steps.getversion.outputs.version}}-setup.exe -Destination podman-installer-windows-${{ matrix.arch }}.exe
215+
Pop-Location
216+
- name: Upload the installer
217+
uses: actions/upload-artifact@v4
218+
with:
219+
name: win-installer-${{ matrix.arch }}
220+
path: |
221+
.\contrib\win-installer\podman-installer-windows-${{ matrix.arch }}.exe
222+
# For backwards compatibility, we also upload the amd64 windows
223+
# installer using the old name
224+
- name: Upload the installer (legacy)
207225
uses: actions/upload-artifact@v4
226+
if: ${{ matrix.arch == 'amd64' }}
208227
with:
209228
name: win-installer
210229
path: |

Makefile

+11-4
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ podman-remote-release-%.zip: test/version/version ## Build podman-remote for %=$
847847
$(MAKE) $(GOPLAT) podman-remote; \
848848
fi
849849
if [[ "$(GOOS)" == "windows" ]]; then \
850-
$(MAKE) $(GOPLAT) TMPDIR="" win-gvproxy; \
850+
$(MAKE) $(GOPLAT) TMPDIR="" win-gvproxy-$(GOARCH); \
851851
fi
852852
if [[ "$(GOOS)" == "darwin" ]]; then \
853853
$(MAKE) $(GOPLAT) podman-mac-helper;\
@@ -862,10 +862,15 @@ podman-remote-release-%.zip: test/version/version ## Build podman-remote for %=$
862862

863863
# Downloads pre-built gvproxy and win-sshproxy helpers. See comment on GVPROXY_VERSION declaration
864864
.PHONY: win-gvproxy
865-
win-gvproxy: test/version/version
865+
win-gvproxy: win-gvproxy-amd64 # Keep this target for backwards compatibility
866+
867+
win-gvproxy-%: test/version/version
868+
$(eval GOARCH := $*)
869+
$(eval GVPROXY_FILENAME := $(if $(filter arm64,$(GOARCH)), gvproxy-windows-arm64.exe,gvproxy-windowsgui.exe))
870+
$(eval SSHPROXY_FILENAME := $(if $(filter arm64,$(GOARCH)), win-sshproxy-arm64.exe, win-sshproxy.exe))
866871
mkdir -p bin/windows/
867-
curl -sSL -o bin/windows/gvproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/gvproxy-windowsgui.exe
868-
curl -sSL -o bin/windows/win-sshproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/win-sshproxy.exe
872+
curl -sSL -o bin/windows/gvproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/$(GVPROXY_FILENAME)
873+
curl -sSL -o bin/windows/win-sshproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/$(SSHPROXY_FILENAME)
869874

870875
.PHONY: rpm
871876
rpm: ## Build rpm packages
@@ -1059,6 +1064,8 @@ release-artifacts: clean-binaries
10591064
mv podman-remote-release-darwin_arm64.zip release/
10601065
$(MAKE) podman-remote-release-windows_amd64.zip
10611066
mv podman-remote-release-windows_amd64.zip release/
1067+
$(MAKE) podman-remote-release-windows_arm64.zip
1068+
mv podman-remote-release-windows_arm64.zip release/
10621069
$(MAKE) podman-remote-static-linux_amd64
10631070
tar -cvzf podman-remote-static-linux_amd64.tar.gz bin/podman-remote-static-linux_amd64
10641071
$(MAKE) podman-remote-static-linux_arm64

contrib/win-installer/build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if ($ENV:INSTVER -eq "") {
105105
}
106106

107107
$installerPlatform = ""
108-
if ($null -eq $ENV:PODMAN_ARCH -or $ENV:PODMAN_ARCH -eq "amd64") {
108+
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH -or "amd64" -eq $ENV:PODMAN_ARCH) {
109109
$installerPlatform = "x64"
110110
} elseif ($ENV:PODMAN_ARCH -eq "arm64") {
111111
$installerPlatform = "arm64"

contrib/win-installer/process-release.ps1

+6-2
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,14 @@ try {
9797
$restore = 1
9898
$ProgressPreference = 'SilentlyContinue';
9999

100+
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH ) {
101+
Write-Warning "PODMAN_ARCH not set, defaulting to amd64"
102+
$ENV:PODMAN_ARCH = "amd64"
103+
}
100104
if ($releaseDir.Length -gt 0) {
101-
Copy-Item -Path "$releaseDir/podman-remote-release-windows_amd64.zip" "release.zip"
105+
Copy-Item -Path "$releaseDir/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
102106
} else {
103-
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_amd64.zip" "release.zip"
107+
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
104108
DownloadOptional "$base_url/releases/download/$version/shasums" ..\shasums
105109
}
106110
Expand-Archive -Path release.zip

winmake.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ param (
1414
Write-Warning "Unsupported architecture $arch. Using default ($defaultArchitecture)."
1515
return $defaultArchitecture
1616
}
17+
return $arch
1718
),
1819
[parameter(ValueFromRemainingArguments)][object[]]$params = @()
1920
)
@@ -109,7 +110,7 @@ function Installer{
109110
[string]$version,
110111
[string]$suffix = "dev"
111112
);
112-
Write-Host "Building the windows installer"
113+
Write-Host "Building the windows installer for $architecture"
113114

114115
# Check for the files to include in the installer
115116
$requiredArtifacts = @(

0 commit comments

Comments
 (0)