From cc729817389d2d4b2aeb350fc6a2ef924350d598 Mon Sep 17 00:00:00 2001 From: Dr Bill Mcilhargey Date: Wed, 25 Nov 2026 03:10:48 -0500 Subject: [PATCH] ci: validate native FreeBSD amd64 builds and tests Document source builds and the boundary between FreeBSD CI and published release assets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ README.md | 21 ++++++++++++++++++++- RELEASING.md | 6 ++++-- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c11b5e..00e0580 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,31 @@ jobs: - if: matrix.os == 'ubuntu-latest' run: cargo test --no-default-features --features rustls-tls --verbose + freebsd: + name: Test (FreeBSD 15.1 amd64) + runs-on: ubuntu-latest + timeout-minutes: 45 + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ inputs.ref || github.sha }} + persist-credentials: false + - uses: vmactions/freebsd-vm@811efaaac0668df8bfb8308c3ec997b5ab50037b # v1.6.0 + with: + release: "15.1" + arch: x86_64 + copyback: false + prepare: pkg install -y rust + run: | + set -eu + rustc --version + cargo test --locked + cargo build --locked --release + ./target/release/librespeed-cli --version + ./target/release/librespeed-cli --help + native-tls: name: Test with the OpenSSL backend runs-on: ubuntu-latest diff --git a/README.md b/README.md index 1c49e0d..7f43281 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,31 @@ a Rust port of the Go [librespeed-cli](https://github.com/librespeed/speedtest-c | OpenWrt | `apk add librespeed-cli-rust`, on 24.10 `opkg install librespeed-cli-rust` | | Cargo | `cargo install --locked librespeed-cli` | | Linux binaries | [Releases](https://github.com/librespeed/speedtest-cli-rust/releases) for x86_64, aarch64, armv7 and arm (musl) | -| From source | `cargo build --release`, the binary is `target/release/librespeed-cli` | +| From source | `cargo build --locked --release`, the binary is `target/release/librespeed-cli` | Set `SOURCE_DATE_EPOCH` for a reproducible build date in `--version`. It fixes only the date and does not make the binary bit-for-bit reproducible, see [RELEASING.md](RELEASING.md#how-to-release). +### FreeBSD + +Build natively on FreeBSD with Rust/Cargo and the base-system C compiler: + +```sh +cargo test --locked +cargo build --locked --release +./target/release/librespeed-cli --version +``` + +CI runs the default rustls/HTTP/2 test suite and a release-build smoke test on +FreeBSD 15.1 amd64. The Go differential test needs a separately built Go client +and is skipped in this job; it runs in the Linux parity job. This does not +qualify other FreeBSD releases, architectures or the OpenSSL backend, and does +not add FreeBSD release downloads. Rust/Cargo are build-time tools only; the +default binary uses base-system libraries, not a runtime OpenSSL package. +Use `--source` for local-address binding: `--interface` is not supported on +FreeBSD and `--fwmark` is Linux-only. + ## Usage ```sh diff --git a/RELEASING.md b/RELEASING.md index d996f65..0310887 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -92,14 +92,16 @@ one chain and stops at the first step that fails: after it is handed that commit instead of resolving the tag again, so a tag that moves mid-release cannot split the run across two of them. 2. **Checks** run [ci.yml](.github/workflows/ci.yml) against that commit: - tests on three platforms, both TLS backends, the minimum supported Rust + tests on Linux, macOS, Windows and FreeBSD 15.1 amd64, both TLS backends + on Linux, the minimum supported Rust version, lint, the fuzz targets, the differential test against the Go client and `cargo package`, and a tag with a known advisory in its `Cargo.lock` stops too. Nothing is built or published until they pass. 3. **Package the crate** verifies the tag against `version` in `Cargo.toml` and builds the `.crate` once, recording its SHA-256. A tag that disagrees stops the run here, before a release exists to leave behind. -4. **Build** cross-builds the musl binaries. +4. **Build** cross-builds the musl binaries. The FreeBSD CI job checks a native + release build but does not publish FreeBSD binaries. 5. **Publish release** attaches the tarballs and `SHA256SUMS` to a GitHub release. 6. **Publish to crates.io** checks the tag again against the commit it is