diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml index b5387a08..c5006171 100644 --- a/.github/workflows/integration_tests.yaml +++ b/.github/workflows/integration_tests.yaml @@ -199,10 +199,22 @@ jobs: goarch: arm64 - goos: freebsd goarch: amd64 + - goos: freebsd + goarch: arm + - goos: freebsd + goarch: arm64 - goos: openbsd goarch: amd64 + - goos: openbsd + goarch: arm + - goos: openbsd + goarch: arm64 - goos: netbsd goarch: amd64 + - goos: netbsd + goarch: arm + - goos: netbsd + goarch: arm64 - goos: dragonfly goarch: amd64 - goos: illumos diff --git a/CHANGELOG.md b/CHANGELOG.md index 57a91aeb..71d7aaa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Facts (Go port) +## Unreleased + +### Added + +- Release artifacts and cross-compile CI now include `arm` and `arm64` for + FreeBSD, OpenBSD, and NetBSD. + ## v0.0.3 - 2026-06-18 ### Added diff --git a/Makefile b/Makefile index 3ec81496..546bb70a 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ LIMA_FREEBSD_FLAGS ?= --mount-none --cpus 2 --memory 4 --disk 40 LIMA_GO_CONTAINER_IMAGES ?= golang:1.26-bookworm golang:1.26-alpine LIMA_DISTRO_IMAGES ?= debian:12-slim ubuntu:24.04 archlinux:latest oraclelinux:9 LIMA_LINUX_FLAVORS ?= ubuntu-lts debian fedora opensuse oraclelinux rocky almalinux alpine archlinux -LIMA_CROSS_TARGETS ?= linux/amd64 linux/arm64 windows/amd64 windows/arm64 darwin/amd64 darwin/arm64 freebsd/amd64 openbsd/amd64 netbsd/amd64 dragonfly/amd64 illumos/amd64 +LIMA_CROSS_TARGETS ?= linux/amd64 linux/arm64 windows/amd64 windows/arm64 darwin/amd64 darwin/arm64 freebsd/amd64 freebsd/arm freebsd/arm64 openbsd/amd64 openbsd/arm openbsd/arm64 netbsd/amd64 netbsd/arm netbsd/arm64 dragonfly/amd64 illumos/amd64 LIMA_LINUX_BINARY ?= dist/facts-linux-$(LIMA_GOARCH) LIMA_FREEBSD_BINARY ?= dist/facts-freebsd-$(LIMA_GOARCH) @@ -55,7 +55,7 @@ LDFLAGS ?= -X github.com/ncode/facts/internal/engine.Version=$(VERSION) PREFIX ?= /usr/local DESTDIR ?= DIST_DIR ?= dist -DIST_TARGETS ?= linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64 freebsd/amd64 openbsd/amd64 netbsd/amd64 dragonfly/amd64 illumos/amd64 +DIST_TARGETS ?= linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64 freebsd/amd64 freebsd/arm freebsd/arm64 openbsd/amd64 openbsd/arm openbsd/arm64 netbsd/amd64 netbsd/arm netbsd/arm64 dragonfly/amd64 illumos/amd64 SHA256 := $(shell command -v sha256sum >/dev/null 2>&1 && echo "sha256sum" || echo "shasum -a 256") .PHONY: test race bench bench-stable build clean dist install docs diff --git a/README.md b/README.md index cb6df9b1..4a8a8a27 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,9 @@ Every release target is a blocking CI gate — unit tests, the race detector ove | Linux | x64, arm64 | native runners + container distro matrix | [Linux facts](docs/supported-facts/linux.md) | | macOS | arm64, x64 | native runners | [macOS / Darwin facts](docs/supported-facts/darwin.md) | | Windows | Server 2022, 2025 | native runners + release-gate fact set | [Windows facts](docs/supported-facts/windows.md) | -| FreeBSD | amd64 | VM job + release-gate fact set | [FreeBSD facts](docs/supported-facts/freebsd.md) | -| OpenBSD | amd64 | VM job + release-gate fact set | [OpenBSD facts](docs/supported-facts/openbsd.md) | -| NetBSD | amd64 | VM job + release-gate fact set | [NetBSD facts](docs/supported-facts/netbsd.md) | +| FreeBSD | amd64, arm, arm64 | VM job + release-gate fact set | [FreeBSD facts](docs/supported-facts/freebsd.md) | +| OpenBSD | amd64, arm, arm64 | VM job + release-gate fact set | [OpenBSD facts](docs/supported-facts/openbsd.md) | +| NetBSD | amd64, arm, arm64 | VM job + release-gate fact set | [NetBSD facts](docs/supported-facts/netbsd.md) | | DragonFly BSD | amd64 | VM job + release-gate fact set | [DragonFly BSD facts](docs/supported-facts/dragonfly.md) | | illumos | amd64 | VM job + release-gate fact set | [illumos facts](docs/supported-facts/illumos.md) | diff --git a/openspec/changes/add-bsd-arm-release-artifacts/proposal.md b/openspec/changes/add-bsd-arm-release-artifacts/proposal.md new file mode 100644 index 00000000..8959e211 --- /dev/null +++ b/openspec/changes/add-bsd-arm-release-artifacts/proposal.md @@ -0,0 +1,17 @@ +## Why + +Go supports `arm` and `arm64` for FreeBSD, OpenBSD, and NetBSD, but Facts only +published amd64 artifacts for those BSD release targets. + +## What Changes + +- Add `arm` and `arm64` artifacts for FreeBSD, OpenBSD, and NetBSD to + `make dist`. +- Add the same tuples to cross-compile CI and Lima cross-compile defaults. +- Update release docs, specs, and changelog. + +## Impact + +- Release artifact matrix expands; runtime fact behavior is unchanged. +- Native BSD release gates remain per-OS gates; the new ARM/ARM64 tuples are + compile-gated. diff --git a/openspec/changes/add-bsd-arm-release-artifacts/specs/go-port-ci-platform-gates/spec.md b/openspec/changes/add-bsd-arm-release-artifacts/specs/go-port-ci-platform-gates/spec.md new file mode 100644 index 00000000..607c431c --- /dev/null +++ b/openspec/changes/add-bsd-arm-release-artifacts/specs/go-port-ci-platform-gates/spec.md @@ -0,0 +1,14 @@ +## MODIFIED Requirements + +### Requirement: CI build matrix is limited to in-scope platforms +The Go port's CI SHALL build only supported release targets and active candidate release targets that have repeatable validation. + +#### Scenario: In-scope cross-compiles +- **WHEN** the cross-compile CI job runs after DragonFly and illumos promotion +- **THEN** it MUST build linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64, freebsd/amd64, freebsd/arm, freebsd/arm64, openbsd/amd64, openbsd/arm, openbsd/arm64, netbsd/amd64, netbsd/arm, netbsd/arm64, dragonfly/amd64, and illumos/amd64 targets only +- **AND** it MUST NOT build solaris or aix targets + +#### Scenario: Oracle Solaris is not built by illumos validation +- **WHEN** the illumos candidate or supported gate runs +- **THEN** the pipeline MUST build `illumos/amd64` +- **AND** it MUST NOT build or publish `solaris/amd64` diff --git a/openspec/changes/add-bsd-arm-release-artifacts/specs/go-port-distribution-and-cutover/spec.md b/openspec/changes/add-bsd-arm-release-artifacts/specs/go-port-distribution-and-cutover/spec.md new file mode 100644 index 00000000..c6602d9f --- /dev/null +++ b/openspec/changes/add-bsd-arm-release-artifacts/specs/go-port-distribution-and-cutover/spec.md @@ -0,0 +1,21 @@ +## MODIFIED Requirements + +### Requirement: Reproducible release artifacts +The Go port SHALL produce versioned, installable release artifacts for all supported targets. + +#### Scenario: dist target builds the artifact matrix +- **WHEN** `make dist` runs after DragonFly and illumos promotion +- **THEN** it MUST produce checksummed archives named `facts---` for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64, freebsd/amd64, freebsd/arm, freebsd/arm64, openbsd/amd64, openbsd/arm, openbsd/arm64, netbsd/amd64, netbsd/arm, netbsd/arm64, dragonfly/amd64, and illumos/amd64, with the version embedded in the binary and reported by `facts --version` + +#### Scenario: install target +- **WHEN** `make install` runs with an optional `PREFIX` +- **THEN** it MUST install the `facts` binary into the standard binary location under that prefix, with no `facter` alias + +#### Scenario: Release workflow publishes artifacts +- **WHEN** a release is cut after DragonFly and illumos promotion +- **THEN** a CI workflow MUST build the `dist` matrix and attach the artifacts and checksums to the release + +#### Scenario: Unsupported Go tuples are not invented +- **WHEN** release artifacts are built +- **THEN** Facts MUST NOT publish DragonFly or illumos architectures that the Go toolchain does not support +- **AND** Facts MUST NOT publish `solaris/amd64` until Oracle Solaris is separately validated and promoted diff --git a/openspec/changes/add-bsd-arm-release-artifacts/tasks.md b/openspec/changes/add-bsd-arm-release-artifacts/tasks.md new file mode 100644 index 00000000..d676bd68 --- /dev/null +++ b/openspec/changes/add-bsd-arm-release-artifacts/tasks.md @@ -0,0 +1,14 @@ +## 1. Implementation + +- [x] 1.1 Add the BSD ARM/ARM64 tuples to `DIST_TARGETS`. +- [x] 1.2 Add the BSD ARM/ARM64 tuples to cross-compile defaults and CI. + +## 2. Documentation + +- [x] 2.1 Update README, CHANGELOG, and distribution/CI specs. + +## 3. Verification + +- [x] 3.1 Confirm the Go toolchain lists the BSD ARM/ARM64 tuples. +- [x] 3.2 Run focused cross-compile checks for the new tuples. +- [x] 3.3 Run `openspec validate add-bsd-arm-release-artifacts --strict`. diff --git a/openspec/specs/go-port-ci-platform-gates/spec.md b/openspec/specs/go-port-ci-platform-gates/spec.md index d85062d6..5854e3b8 100644 --- a/openspec/specs/go-port-ci-platform-gates/spec.md +++ b/openspec/specs/go-port-ci-platform-gates/spec.md @@ -30,7 +30,7 @@ The Go port's CI SHALL build only supported release targets and active candidate #### Scenario: In-scope cross-compiles - **WHEN** the cross-compile CI job runs after DragonFly and illumos promotion -- **THEN** it MUST build linux, darwin, windows, freebsd, openbsd, netbsd, dragonfly, and illumos targets only +- **THEN** it MUST build linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64, freebsd/amd64, freebsd/arm, freebsd/arm64, openbsd/amd64, openbsd/arm, openbsd/arm64, netbsd/amd64, netbsd/arm, netbsd/arm64, dragonfly/amd64, and illumos/amd64 targets only - **AND** it MUST NOT build solaris or aix targets #### Scenario: Oracle Solaris is not built by illumos validation diff --git a/openspec/specs/go-port-distribution-and-cutover/spec.md b/openspec/specs/go-port-distribution-and-cutover/spec.md index ec84d50a..d0711bae 100644 --- a/openspec/specs/go-port-distribution-and-cutover/spec.md +++ b/openspec/specs/go-port-distribution-and-cutover/spec.md @@ -8,7 +8,7 @@ The Go port SHALL produce versioned, installable release artifacts for all suppo #### Scenario: dist target builds the artifact matrix - **WHEN** `make dist` runs after DragonFly and illumos promotion -- **THEN** it MUST produce checksummed archives named `facts---` for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64, freebsd/amd64, openbsd/amd64, netbsd/amd64, dragonfly/amd64, and illumos/amd64, with the version embedded in the binary and reported by `facts --version` +- **THEN** it MUST produce checksummed archives named `facts---` for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64, freebsd/amd64, freebsd/arm, freebsd/arm64, openbsd/amd64, openbsd/arm, openbsd/arm64, netbsd/amd64, netbsd/arm, netbsd/arm64, dragonfly/amd64, and illumos/amd64, with the version embedded in the binary and reported by `facts --version` #### Scenario: install target - **WHEN** `make install` runs with an optional `PREFIX`