Skip to content

Commit bde3370

Browse files
authored
Merge pull request #72 from rust-osdev/fuzz-ci
Run new cargo-fuzz job on CI with time limit
2 parents aa7d9f6 + 20c624f commit bde3370

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/fuzz.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Fuzz
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
tags:
8+
- "*"
9+
schedule:
10+
- cron: "40 6 * * *" # every day at 6:40
11+
pull_request:
12+
13+
env:
14+
# disable incremental compilation.
15+
#
16+
# incremental compilation is useful as part of an edit-build-test-edit cycle,
17+
# as it lets the compiler avoid recompiling code that hasn't changed. however,
18+
# on CI, we're not making small edits; we're almost always building the entire
19+
# project from scratch. thus, incremental compilation on CI actually
20+
# introduces *additional* overhead to support making future builds
21+
# faster...but no future builds will ever occur in any given CI environment.
22+
#
23+
# see https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
24+
# for details.
25+
CARGO_INCREMENTAL: 0
26+
# allow more retries for network requests in cargo (downloading crates) and
27+
# rustup (installing toolchains). this should help to reduce flaky CI failures
28+
# from transient network timeouts or other issues.
29+
CARGO_NET_RETRY: 10
30+
RUSTUP_MAX_RETRIES: 10
31+
# don't emit giant backtraces in the CI logs.
32+
RUST_BACKTRACE: short
33+
34+
jobs:
35+
fuzz:
36+
name: "Fuzzer"
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 20
39+
steps:
40+
- uses: actions/checkout@v1
41+
- run: cargo install cargo-fuzz
42+
- run: cargo fuzz run chaos -- -max_total_time=300

0 commit comments

Comments
 (0)