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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,31 @@ jobs:

- name: Run tests
run: cargo test --all-features --locked --verbose

proto-vendored-up-to-date:
name: Vendored proto code is up to date
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo dependencies and build artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: tools/gen-proto -> tools/gen-proto/target

- name: Regenerate vendored proto code
run: cargo run --manifest-path tools/gen-proto/Cargo.toml --locked

- name: Verify src/proto/generated/ has no drift
run: |
if ! git diff --exit-code -- src/proto/generated; then
echo "::error::src/proto/generated/ is out of date. Run:" >&2
echo " cargo run --manifest-path tools/gen-proto/Cargo.toml" >&2
echo "and commit the result." >&2
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths:
- "src/**"
- "proto/**"
- "build.rs"
- "tools/gen-proto/**"
- "Cargo.toml"
- "Cargo.lock"
- "README.md"
Expand All @@ -17,7 +17,7 @@ on:
paths:
- "src/**"
- "proto/**"
- "build.rs"
- "tools/gen-proto/**"
- "Cargo.toml"
- "Cargo.lock"
- "README.md"
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ profile.json.gz
# Local binaries
binary

Cargo.lock
Cargo.lock
# Track the lockfile for the maintainer-only `tools/gen-proto` so that CI's
# vendored-proto drift check uses the same `prost-build` version the
# maintainer used when committing `src/proto/generated/`.
!/tools/gen-proto/Cargo.lock
Loading
Loading