Skip to content

Commit

Permalink
chore: add Windows ARM64 build for talosctl
Browse files Browse the repository at this point in the history
Add Windows ARM64 build for talosctl.

Signed-off-by: Nebula <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
nebula-it authored and frezbo committed Nov 4, 2024
1 parent 9abf161 commit 4b10c53
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3567,8 +3567,8 @@ jobs:
- name: Generate Checksums
run: |
cd _out
sha256sum cloud-images.json initramfs-amd64.xz initramfs-arm64.xz metal-amd64.iso metal-arm64.iso metal-amd64.raw.zst metal-arm64.raw.zst talosctl-cni-bundle-amd64.tar.gz talosctl-cni-bundle-arm64.tar.gz talosctl-darwin-amd64 talosctl-darwin-arm64 talosctl-freebsd-amd64 talosctl-freebsd-arm64 talosctl-linux-amd64 talosctl-linux-arm64 talosctl-linux-armv7 talosctl-windows-amd64.exe vmlinuz-amd64 vmlinuz-arm64 > sha256sum.txt
sha512sum cloud-images.json initramfs-amd64.xz initramfs-arm64.xz metal-amd64.iso metal-arm64.iso metal-amd64.raw.zst metal-arm64.raw.zst talosctl-cni-bundle-amd64.tar.gz talosctl-cni-bundle-arm64.tar.gz talosctl-darwin-amd64 talosctl-darwin-arm64 talosctl-freebsd-amd64 talosctl-freebsd-arm64 talosctl-linux-amd64 talosctl-linux-arm64 talosctl-linux-armv7 talosctl-windows-amd64.exe vmlinuz-amd64 vmlinuz-arm64 > sha512sum.txt
sha256sum cloud-images.json initramfs-amd64.xz initramfs-arm64.xz metal-amd64.iso metal-arm64.iso metal-amd64.raw.zst metal-arm64.raw.zst talosctl-cni-bundle-amd64.tar.gz talosctl-cni-bundle-arm64.tar.gz talosctl-darwin-amd64 talosctl-darwin-arm64 talosctl-freebsd-amd64 talosctl-freebsd-arm64 talosctl-linux-amd64 talosctl-linux-arm64 talosctl-linux-armv7 talosctl-windows-amd64.exe talosctl-windows-arm64.exe vmlinuz-amd64 vmlinuz-arm64 > sha256sum.txt
sha512sum cloud-images.json initramfs-amd64.xz initramfs-arm64.xz metal-amd64.iso metal-arm64.iso metal-amd64.raw.zst metal-arm64.raw.zst talosctl-cni-bundle-amd64.tar.gz talosctl-cni-bundle-arm64.tar.gz talosctl-darwin-amd64 talosctl-darwin-arm64 talosctl-freebsd-amd64 talosctl-freebsd-arm64 talosctl-linux-amd64 talosctl-linux-arm64 talosctl-linux-armv7 talosctl-windows-amd64.exe talosctl-windows-arm64.exe vmlinuz-amd64 vmlinuz-arm64 > sha512sum.txt
- name: release
uses: crazy-max/ghaction-github-release@v2
with:
Expand All @@ -3592,6 +3592,7 @@ jobs:
_out/talosctl-linux-arm64
_out/talosctl-linux-armv7
_out/talosctl-windows-amd64.exe
_out/talosctl-windows-arm64.exe
_out/vmlinuz-amd64
_out/vmlinuz-arm64
_out/sha*.txt
1 change: 1 addition & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ spec:
- talosctl-linux-arm64
- talosctl-linux-armv7
- talosctl-windows-amd64.exe
- talosctl-windows-arm64.exe
- vmlinuz-amd64
- vmlinuz-arm64
generateChecksums: true
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,13 @@ ARG GOAMD64
RUN --mount=type=cache,target=/.cache GOOS=windows GOARCH=amd64 GOAMD64=${GOAMD64} go build ${GO_BUILDFLAGS_TALOSCTL} -ldflags "${GO_LDFLAGS}" -o /talosctl-windows-amd64.exe
RUN touch --date="@${SOURCE_DATE_EPOCH}" /talosctl-windows-amd64.exe

FROM base AS talosctl-windows-arm64-build
WORKDIR /src/cmd/talosctl
ARG GO_BUILDFLAGS_TALOSCTL
ARG GO_LDFLAGS
RUN --mount=type=cache,target=/.cache GOOS=windows GOARCH=arm64 go build ${GO_BUILDFLAGS_TALOSCTL} -ldflags "${GO_LDFLAGS}" -o /talosctl-windows-arm64.exe
RUN touch --date="@${SOURCE_DATE_EPOCH}" /talosctl-windows-arm64.exe

FROM base AS talosctl-freebsd-amd64-build
WORKDIR /src/cmd/talosctl
ARG GO_BUILDFLAGS_TALOSCTL
Expand Down Expand Up @@ -585,6 +592,7 @@ COPY --from=talosctl-darwin-arm64 / /
COPY --from=talosctl-freebsd-amd64 / /
COPY --from=talosctl-freebsd-arm64 / /
COPY --from=talosctl-windows-amd64 / /
COPY --from=talosctl-windows-arm64 / /

FROM scratch AS talosctl
ARG TARGETARCH
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,9 @@ taloscl-freebsd-arm64:
talosctl-windows-amd64:
@$(MAKE) local-talosctl-windows-amd64 DEST=$(ARTIFACTS) PUSH=false NAME=Client

talosctl-windows-arm64:
@$(MAKE) local-talosctl-windows-arm64 DEST=$(ARTIFACTS) PUSH=false NAME=Client

talosctl:
@$(MAKE) local-talosctl-targetarch DEST=$(ARTIFACTS)

Expand Down

0 comments on commit 4b10c53

Please sign in to comment.