Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |

Expand Down
17 changes: 17 additions & 0 deletions openspec/changes/add-bsd-arm-release-artifacts/proposal.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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-<version>-<os>-<arch>` 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
14 changes: 14 additions & 0 deletions openspec/changes/add-bsd-arm-release-artifacts/tasks.md
Original file line number Diff line number Diff line change
@@ -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`.
2 changes: 1 addition & 1 deletion openspec/specs/go-port-ci-platform-gates/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion openspec/specs/go-port-distribution-and-cutover/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version>-<os>-<arch>` 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-<version>-<os>-<arch>` 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`
Expand Down
Loading