Cross-compile the ARM targets in CI and the gate
Releases ship linux/arm (ARMv6 and ARMv7) and linux/arm64 binaries built without cgo, but until now nothing compiled those targets before a tag was pushed. The job store's SQLite driver is Go transpiled from C, with code of its own for each architecture, so a build that works on amd64 can fail for ARM. test.yml and make check now build the daemon for linux/arm with GOARM=6 and for linux/arm64, with CGO_ENABLED=0, and discard the binaries. The ARMv6 build stands for ARMv7 as well. CLAUDE.md lists the two builds in the gate, run from Git Bash, since PowerShell cannot set variables for one command. Part of stage 1d of docs/plans/job-store.md (decision 15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8609f3be27
commit
60baa843ef
4 files changed
+39
-16
No files matched your search
@@ -1,4 +1,4 @@
|
||||
.PHONY: build test lint fmt fmt-check vet tidy tidy-check vuln generate generate-check release-check snapshot check run
|
||||
.PHONY: build build-arm test lint fmt fmt-check vet tidy tidy-check vuln generate generate-check release-check snapshot check run
|
||||
|
||||
# Without the leading v, as goreleaser's {{ .Version }} reports it.
|
||||
VERSION ?= $(patsubst v%,%,$(shell git describe --tags --always --dirty 2>/dev/null || echo dev))
|
||||
@@ -11,6 +11,12 @@ GENERATED := docs/swagger.json THIRD-PARTY-LICENSES.md internal/app/uberbringer/
|
||||
build:
|
||||
go build -trimpath -ldflags "$(LDFLAGS)" -o bin/ ./cmd/...
|
||||
|
||||
# Cross-compiles the daemon for 32-bit (ARMv6) and 64-bit ARM without cgo,
|
||||
# as releases are built, and discards the binaries.
|
||||
build-arm:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o /dev/null ./cmd/uberbringer
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o /dev/null ./cmd/uberbringer
|
||||
|
||||
# The limit is per package: a hung test fails with every goroutine's stack.
|
||||
test:
|
||||
go test -race -timeout 5m ./...
|
||||
@@ -56,13 +62,13 @@ release-check:
|
||||
|
||||
# Cross-compiles every shipped target and packs the release archives into
|
||||
# dist/, publishing nothing. Run it after changing .goreleaser.yaml or
|
||||
# packaging/; CI builds binaries only for release tags.
|
||||
# packaging/; CI builds release binaries only for tags.
|
||||
snapshot:
|
||||
goreleaser release --snapshot --clean
|
||||
|
||||
# The gate .gitea/workflows/test.yml runs, in the same order.
|
||||
# .gitea/workflows/security.yml runs vuln.
|
||||
check: fmt-check tidy-check vet lint generate-check test release-check
|
||||
check: fmt-check tidy-check vet lint generate-check test build-arm release-check
|
||||
|
||||
run:
|
||||
go run ./cmd/uberbringer --config config.toml
|
||||
Reference in new issue
Block a user