Skip to content
Open
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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down