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
37 changes: 16 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install just
uses: extractions/setup-just@v3
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: cargo fmt (check)
run: cargo fmt -- --check -l
- name: Build
run: cargo build
- name: Test
run: cargo test -- --nocapture --quiet
- name: cargo clippy
run: cargo clippy -- -D warnings
- name: CI (check + test)
run: just ci

msrv:
name: MSRV
Expand Down Expand Up @@ -92,22 +88,21 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
- name: Install just
uses: extractions/setup-just@v3
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: fuzz
- name: Generate seed corpus
run: cargo run --manifest-path fuzz/Cargo.toml --bin generate-corpus
run: just generate-corpus
- name: Fuzz all targets (2 minutes each)
run: |
mkdir -p fuzz-logs
for target in $(cargo +nightly fuzz list); do
echo "--- Fuzzing $target (2 min) ---"
cargo +nightly fuzz run "$target" -- -max_total_time=120 \
> "fuzz-logs/$target.log" 2>&1 \
&& echo " $target: OK" \
|| { echo "::error::Fuzzer $target failed"; cat "fuzz-logs/$target.log"; exit 1; }
# Print final stats line
tail -1 "fuzz-logs/$target.log"
done
working-directory: fuzz
run: just fuzz-all
- name: Upload fuzz artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts
path: |
fuzz/artifacts/
target/fuzz-logs/
24 changes: 12 additions & 12 deletions .github/workflows/fuzz-extended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
- name: Install just
uses: extractions/setup-just@v3
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: fuzz
- name: Generate seed corpus
run: cargo run --manifest-path fuzz/Cargo.toml --bin generate-corpus
run: just generate-corpus
- name: Fuzz all targets (15 minutes each)
run: |
mkdir -p fuzz-logs
for target in $(cargo +nightly fuzz list); do
echo "--- Fuzzing $target (15 min) ---"
cargo +nightly fuzz run "$target" -- -max_total_time=900 \
> "fuzz-logs/$target.log" 2>&1 \
&& echo " $target: OK" \
|| { echo "::error::Fuzzer $target failed"; cat "fuzz-logs/$target.log"; exit 1; }
tail -1 "fuzz-logs/$target.log"
done
working-directory: fuzz
run: just fuzz-all 900
- name: Upload fuzz artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts
path: |
fuzz/artifacts/
target/fuzz-logs/
5 changes: 3 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ unit:
else \
cargo test; \
fi
cargo test --no-default-features

# Run cross-language interop tests (requires python3, go)
interop:
Expand All @@ -27,8 +28,8 @@ interop:
# Run all tests
test-all: unit interop

# Full CI check (format, lint, test, fuzz)
ci: check unit fuzz-all
# CI check (format, lint, test); see also fuzz-all
ci: check unit

# Run Kani formal verification proofs (install: cargo install --locked kani-verifier && cargo kani setup)
kani:
Expand Down
Loading