- scripts/in-namespace.sh set CARGO_TARGET_DIR to the empty string when it was unset, which cargo refuses, and dropped RUSTFLAGS, so the run in the namespace rebuilt what kernel-tests.sh had just built. Each is passed on only where set. - The README's list of unsupported features still had route reflection and graceful restart, both of which exist; the command-line reference lacked SIGUSR1 and exit status 75; the HTTP API reference did not say what errors look like. - The event stream said "missed 0 events" for the best-routes stream, which does not count what it missed; it leaves the count out now. - CI lints bgp-bench with its count-memory feature, which nothing built. - bgp-bench had two unused dev-dependencies; bgp-integration-tests had three dependencies that only its tests and examples use. - install.sh updates apt before installing; two-routers.sh loses an unused variable; small things in the web crate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
100 lines
3.5 KiB
YAML
100 lines
3.5 KiB
YAML
# Runs on every push and pull request. Gitea Actions reads this file too
|
|
# (it falls back to .github/workflows), so one definition serves both.
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
# Warnings fail the build here, and only here: locally they stay warnings
|
|
# so that work in progress compiles.
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
- name: Lint
|
|
run: cargo clippy --locked --workspace --all-targets -- -D warnings
|
|
# The memory-counting allocator of the benchmarks is behind a feature
|
|
# that the workspace build does not turn on.
|
|
- name: Lint the benchmarks with memory counting
|
|
run: cargo clippy --locked -p bgp-bench --all-targets --features count-memory -- -D warnings
|
|
- name: Test
|
|
run: cargo test --locked --workspace
|
|
# A link in the documentation to something that is not there.
|
|
- name: Documentation
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
run: cargo doc --locked --workspace --no-deps --document-private-items
|
|
# The examples operators start from, here and in the documentation,
|
|
# through the daemon itself.
|
|
- name: Example configurations
|
|
run: |
|
|
for config in testdata/server.textpb docs/examples/*.textpb; do
|
|
cargo run --locked -p bgp -- --check "$config"
|
|
done
|
|
# The tests that change a kernel's routes, in a network namespace of
|
|
# their own; and two daemons that route for each other.
|
|
- name: Kernel tests
|
|
run: scripts/kernel-tests.sh
|
|
|
|
# The documentation site. Zola fails the build on a link to a page or an
|
|
# anchor that is not there.
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ZOLA_VERSION: "0.22.1"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Zola
|
|
run: |
|
|
curl -sSfL "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
|
|
| sudo tar -xz -C /usr/local/bin zola
|
|
- name: Build
|
|
run: zola --root docs build
|
|
|
|
# The daemon against FRR, BIRD and Routinator; see
|
|
# docs/content/docs/development/testing.md.
|
|
interop:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Install FRR, BIRD and Routinator
|
|
run: scripts/interop/install.sh
|
|
- name: Build
|
|
run: cargo build --release --locked -p bgp
|
|
- name: Interoperability lab
|
|
run: scripts/interop/lab.sh
|
|
|
|
# A short run of each fuzz target: enough to notice a parser change that
|
|
# breaks on input the seeds are close to. Long runs are done by hand; see
|
|
# fuzz/README.md.
|
|
fuzz:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
- name: Install cargo-fuzz
|
|
run: cargo install cargo-fuzz --locked
|
|
- name: Fuzz
|
|
working-directory: fuzz
|
|
# cargo-fuzz sets its own flags; the workspace's -D warnings would
|
|
# replace them.
|
|
env:
|
|
RUSTFLAGS: ""
|
|
run: |
|
|
for target in message message_body attrs prefix_text config rtr netlink; do
|
|
mkdir -p "corpus/$target"
|
|
cargo fuzz run "$target" "corpus/$target" "seeds/$target" -- -max_total_time=60
|
|
done
|