Files
radicle-explorer/.buildkite/rust.yml
T
Daniel NormanandRūdolfs Ošiņš b1acb3eb4d Integrate radicle-artifact into explorer
- Add release read API to httpd as cargo feature enabled by default
- Add Releases and Release views to the UI
- Filter out redacted artifacts and mark delegate authors
- Degrade releases UI gracefully with older radicle-httpd versions
- Hide fully redacted releases
- Skip releases in the list endpoint when every artifact was redacted by
  its author or a delegate, so no empty release entries are shown
- Keep them reachable with showRedacted=true and by release id
- Add e2e tests for the release routes

Co-Authored-By: Rūdolfs Ošiņš <rudolfs@osins.org>
2026-08-28 16:33:14 +02:00

84 lines
2.9 KiB
YAML

# CI for the Rust workspace (crates/radicle-httpd, crates/radicle-search).
#
# Each step gets its own named cache volume. Clippy, test, and doc each produce a
# different target directory, and a shared volume would let whichever step
# commits last discard the other two, forcing a near-full rebuild every build.
#
# These steps run on the agent rather than in a container, so ~-rooted cache
# paths work. The toolchain version is not pinned here: rustup reads
# ./rust-toolchain.
#
# Every step needs network access to seed.radicle.dev as well as crates.io — the
# workspace patches radicle-job to a git dependency served from a Radicle seed.
env:
CI: "true"
CARGO_TERM_COLOR: "always"
__defs:
install_rust: &install_rust |
export PATH="$$HOME/.cargo/bin:$$PATH"
export CARGO_TARGET_DIR="$$HOME/.cache/cargo-target"
if ! command -v rustup >/dev/null 2>&1; then
curl -fsSL https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal
fi
rustc --version
# Only the parts of ~/.cargo that are expensive to fetch again. registry/src
# and git/checkouts are left out on purpose: cargo re-creates both from the
# cache and the git db, so caching them would double the size of the volume
# for no gain.
#
# Nothing prunes the target directory, so it keeps the artifacts of every
# dependency version the branch has ever built. Deleting the volume is the
# only cleanup, and it costs one full rebuild.
cargo_cache: &cargo_cache
- "~/.cargo/bin"
- "~/.cargo/registry/index"
- "~/.cargo/registry/cache"
- "~/.cargo/git/db"
- "~/.rustup"
- "~/.cache/cargo-target"
steps:
# RUSTFLAGS is set on the build only, not on the test run.
- label: "🦀 test"
key: test
timeout_in_minutes: 30
cache:
name: rust-test
paths: *cargo_cache
commands:
- *install_rust
- RUSTFLAGS="-D warnings" cargo build --workspace --all-features
- cargo test --workspace --all-features
- cargo test -p radicle-httpd
- label: "📚 doc"
key: doc
timeout_in_minutes: 30
cache:
name: rust-doc
paths: *cargo_cache
commands:
- *install_rust
- RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features
- label: "🦀 lint"
key: lint
timeout_in_minutes: 30
cache:
name: rust-lint
paths: *cargo_cache
commands:
- *install_rust
# The minimal profile ships neither, and rust-toolchain names no
# components. Only this step needs them.
- rustup component add rustfmt clippy
- RUSTFLAGS="-D warnings" cargo clippy --workspace --all-features --tests
# Run clippy with default features disabled (artifacts)
# TODO: If more features are added explore adding `cargo hack --feature-powerset`
# to cover every feature combination
- RUSTFLAGS="-D warnings" cargo clippy -p radicle-httpd --no-default-features --tests
- cargo fmt --all -- --check