Skip to content

feat: add linux/arm64 build and release support#75

Merged
perber merged 2 commits into
perber:mainfrom
nahaktarun:feature/linux-arm64-support
Jun 10, 2025
Merged

feat: add linux/arm64 build and release support#75
perber merged 2 commits into
perber:mainfrom
nahaktarun:feature/linux-arm64-support

Conversation

@nahaktarun
Copy link
Copy Markdown
Contributor

Issue: #71

Feature change:

  • Added linux/arm64 to the Makefile’s PLATFORMS so make release now builds an ARM64 binary.
  • Updated the release workflow to upload the ARM64 binary and its checksum to GitHub Releases.
  • ARM64 binary can be tested using Docker.

How to test:

  • Run make release locally (requires Docker) — check that releases/leafwiki--linux-arm64 and its checksum are produced.
  • (optional) enable the buildx docker buildx create --use --name multiarch.
  • Verify with the target build
    docker run --rm -it --platform linux/arm64 \ -v "$(pwd)":/app \ ubuntu:22.04 \ /app/releases/leafwiki-v0.1.0-linux-arm64 --help

Feel free to review and test .

Copilot AI review requested due to automatic review settings June 9, 2025 13:47
@nahaktarun nahaktarun requested a review from perber as a code owner June 9, 2025 13:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for building and releasing a linux/arm64 binary alongside existing platforms.

  • Updated Makefile to include linux/arm64 in the build targets
  • Enhanced the GitHub release workflow to upload the ARM64 binary and checksum

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Makefile Added linux/arm64 to PLATFORMS for ARM builds
.github/workflows/release.yml Included ARM64 artifacts in the release upload
Comments suppressed due to low confidence (1)

Makefile:7

  • Update this comment to reflect the addition of linux/arm64, e.g., # At the moment we can test on linux/amd64, linux/arm64, and windows/amd64.
# At the moment we only can test it on linux/amd64 and windows/amd64

@perber
Copy link
Copy Markdown
Owner

perber commented Jun 9, 2025

@nahaktarun Thanks! Your change is looking good. I will test it the upcoming days and leave it open until I tried it on my raspi.

@perber perber linked an issue Jun 9, 2025 that may be closed by this pull request
@perber
Copy link
Copy Markdown
Owner

perber commented Jun 10, 2025

I tested it via the Docker:

FROM --platform=linux/arm64 debian:bullseye-slim

WORKDIR /app
COPY releases/leafwiki-v0.1.0-linux-arm64 /app/leafwiki

EXPOSE 9595

CMD ["/app/leafwiki", "--jwt-secret", "test1234567", "--port", "9595"]
docker buildx build \
  --platform linux/arm64 \
  -f Dockerfile.arm64 \
  -t leafwiki-arm64-runtime \
  --load .
file releases/leafwiki-v0.1.0-linux-arm64
releases/leafwiki-v0.1.0-linux-arm64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=U6HcXS1ZycQ2qplkNCvD/I8swxEoJUmKqtdLTZ1PG/o4-EuinovSZNHqhEYy54/JxVwTBzfWMIaYV7N4BQt, stripped

@perber perber merged commit 246aa58 into perber:main Jun 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ARM build target

3 participants