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,8 +1,9 @@
|
||||
name: Test
|
||||
|
||||
# Every branch push, and no pull_request trigger: branches are pushed
|
||||
# directly, so each commit runs once. Branch pushes lint and test but build
|
||||
# no binaries; binaries are built only by release.yml, for tags on main.
|
||||
# directly, so each commit runs once. Branch pushes lint, test and
|
||||
# cross-compile for ARM, but keep no binaries; release binaries are built
|
||||
# only by release.yml, for tags on main.
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
@@ -72,6 +73,14 @@ jobs:
|
||||
- name: Test (race detector)
|
||||
run: go test -race -timeout 5m ./...
|
||||
|
||||
# Release binaries are built for ARM without cgo, and the tests run on
|
||||
# amd64 only, so code that builds there but not for 32-bit or 64-bit
|
||||
# ARM fails here rather than on a tag. The binaries are discarded.
|
||||
- name: Build for ARM
|
||||
run: |
|
||||
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
|
||||
|
||||
# Validates .goreleaser.yaml without building anything, so a config
|
||||
# error fails here rather than on a tag. Same pin as release.yml.
|
||||
- name: GoReleaser config check
|
||||
|
||||
Reference in new issue
Block a user