From da3d7201a17457997597f743b2b51621f61b5d76 Mon Sep 17 00:00:00 2001 From: Veillax <126523099+Veillax@users.noreply.github.com> Date: Mon, 26 Oct 2026 15:48:53 -0600 Subject: [PATCH] Build and publish only linux/amd64 and windows/amd64 Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/ci.yml | 2 +- .gitea/workflows/release.yml | 2 +- README.md | 4 ++-- deploy/build.sh | 5 +++-- deploy/setup.sh | 4 +--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9b32f6a..c9f1c5f 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: # Catches platform-specific breakage before a release is tagged. - name: Every release platform compiles run: | - for t in linux/amd64 linux/arm64 linux/arm windows/amd64 darwin/amd64 darwin/arm64; do + for t in linux/amd64 windows/amd64; do echo "building for $t" GOOS=${t%/*} GOARCH=${t#*/} GOARM=7 CGO_ENABLED=0 go build -o /dev/null ./cmd/hammerhead done diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ab3611f..d67bf59 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -59,4 +59,4 @@ jobs: *-*) ;; # pre-releases (v1.0.0-rc1) don't move :latest *) tags="$tags -t $image:latest" ;; esac - docker buildx build --platform linux/amd64,linux/arm64 $tags --push . + docker buildx build --platform linux/amd64 $tags --push . diff --git a/README.md b/README.md index 197bc6f..e38d28a 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ ports. Then open ports on the **Resources** page. ## Deploying -Releases are built by Gitea Actions. Pushing a tag such as `v0.2.0` runs `.gitea/workflows/release.yml`, which tests the code, builds Hammerhead for Linux (amd64, arm64, armv7), Windows (amd64) and macOS (amd64, arm64), publishes the archives with a `SHA256SUMS` file on the Releases page, and pushes a multi-architecture container image to this server's registry (`git.veillax.com/veillax/hammerhead`). Every push and pull request runs `.gitea/workflows/ci.yml`: formatting, vet, tests, and a check that every release platform still compiles. +Releases are built by Gitea Actions. Pushing a tag such as `v0.2.0` runs `.gitea/workflows/release.yml`, which tests the code, builds Hammerhead for Linux (amd64) and Windows (amd64), publishes the archives with a `SHA256SUMS` file on the Releases page, and pushes a container image (linux/amd64) to this server's registry (`git.veillax.com/veillax/hammerhead`). Every push and pull request runs `.gitea/workflows/ci.yml`: formatting, vet, tests, and a check that every release platform still compiles. **Fastest: one script on a fresh VPS** @@ -67,7 +67,7 @@ sudoedit /etc/hammerhead/hammerhead.env # your settings and secrets sudo systemctl start hammerhead ``` -Use `linux_arm64` or `linux_arm` for Raspberry Pi and other ARM machines. To upgrade, repeat the same steps: your settings and data are kept. `sudo ./install.sh --uninstall` removes the service and binary but leaves `/etc/hammerhead` and `/var/lib/hammerhead` alone. `hammerhead -version` tells you which build is running. +Releases are published for x86-64 only; for ARM machines build it yourself (`TARGETS=linux/arm64 sh deploy/build.sh`). To upgrade, repeat the same steps: your settings and data are kept. `sudo ./install.sh --uninstall` removes the service and binary but leaves `/etc/hammerhead` and `/var/lib/hammerhead` alone. `hammerhead -version` tells you which build is running. **Updates** diff --git a/deploy/build.sh b/deploy/build.sh index b79a22f..e8a6187 100644 --- a/deploy/build.sh +++ b/deploy/build.sh @@ -8,12 +8,13 @@ # dist/hammerhead___.tar.gz or .zip # dist/SHA256SUMS # -# Set TARGETS="linux/amd64 linux/arm64" to build fewer platforms. +# Releases are published for linux/amd64 and windows/amd64 only. Set TARGETS="linux/arm64 darwin/arm64" +# (any GOOS/GOARCH pair Go supports) to build something else by hand. set -eu NAME=hammerhead cd "$(dirname "$0")/.." VERSION=${1:-$(git describe --tags --always 2>/dev/null || echo dev)} -TARGETS=${TARGETS:-"linux/amd64 linux/arm64 linux/arm windows/amd64 darwin/amd64 darwin/arm64"} +TARGETS=${TARGETS:-"linux/amd64 windows/amd64"} rm -rf dist mkdir -p dist/bin dist/stage diff --git a/deploy/setup.sh b/deploy/setup.sh index e75c3ed..6b61f15 100644 --- a/deploy/setup.sh +++ b/deploy/setup.sh @@ -51,9 +51,7 @@ command -v systemctl > /dev/null 2>&1 || die "this needs a systemd-based Linux ( case "$(uname -m)" in x86_64 | amd64) ARCH=amd64 ;; - aarch64 | arm64) ARCH=arm64 ;; - armv7* | armv6* | arm) ARCH=arm ;; - *) die "unsupported CPU: $(uname -m)" ;; + *) die "releases are published for x86-64 Linux only, not $(uname -m); build it yourself with: TARGETS=linux/arm64 sh deploy/build.sh" ;; esac pkg_install() { # installs packages with whichever package manager there is