Skip to content

Commit

Permalink
Add no-change check to build-fuzz and docs builds (#1383)
Browse files Browse the repository at this point in the history
### What
Add no-change checks to the build-fuzz and docs builds, that errors if
there are any changes to the working directory after the builds run.

### Why
To detect files that weren't generated or updated relating to builds.
Also checks the lock file is up to date.

We could alternative use options on cargo to freeze the lock file, which
is another way to achieve same for that one file. However, this more
general check will check any files that changes as part of build, so
it's broader.
  • Loading branch information
leighmcculloch authored Oct 24, 2024
1 parent e7eccd3 commit 433ce5c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ jobs:
name: cargo-fuzz
version: 0.11.2
- run: make build-fuzz
- name: Check no diffs exist
run: git add -N . && git diff HEAD --exit-code

docs:
runs-on: ubuntu-latest
Expand All @@ -147,6 +149,8 @@ jobs:
# TODO: Unpin nightly version after https://github.com/rust-lang/rust/issues/131643 is fixed.
- run: rustup install nightly-2024-10-10
- run: make doc
- name: Check no diffs exist
run: git add -N . && git diff HEAD --exit-code

readme:
runs-on: ubuntu-latest
Expand Down
37 changes: 19 additions & 18 deletions tests/fuzz/fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 433ce5c

Please sign in to comment.