File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ schedule :
3
+ - cron : " 00 05 * * *" # At 05:00 (UTC) every day.
4
+ workflow_dispatch : # allows manual triggering
5
+
6
+ permissions : {}
7
+
8
+ name : Daily Fuzz
9
+
10
+ jobs :
11
+ fuzz :
12
+ name : Cargo Fuzz
13
+ runs-on : ubuntu-latest
14
+ env :
15
+ # The version of `cargo-fuzz` to install and use.
16
+ CARGO_FUZZ_VERSION : 0.13.1
17
+
18
+ # The number of seconds to run the fuzz target. 1800 seconds = 30 minutes.
19
+ FUZZ_TIME : 1800
20
+
21
+ strategy :
22
+ fail-fast : false
23
+ matrix :
24
+ include :
25
+ - fuzz_target : bdk_wallet
26
+
27
+ steps :
28
+ - name : Checkout
29
+ uses : actions/checkout@v4
30
+ with :
31
+ persist-credentials : false
32
+
33
+ - name : Install the nightly Rust channel
34
+ uses : actions-rs/toolchain@v1
35
+ with :
36
+ toolchain : nightly
37
+ override : true
38
+ profile : minimal
39
+
40
+ - name : Install and Cache `cargo-fuzz`
41
+ uses : actions/cache@v4
42
+ with :
43
+ path : ${{ runner.tool_cache }}/cargo-fuzz
44
+ key : cargo-fuzz-bin-${{ env.CARGO_FUZZ_VERSION }}
45
+ run : |
46
+ echo "${{ runner.tool_cache }}/cargo-fuzz/bin" >> $GITHUB_PATH
47
+ cargo install --root "${{ runner.tool_cache }}/cargo-fuzz" --version ${{ env.CARGO_FUZZ_VERSION }} cargo-fuzz --locked
48
+
49
+ - name : Build & Run Fuzz Target
50
+ run : |
51
+ fuzz_time = "$FUZZ_TIME"
52
+ cargo fuzz build ${{ matrix.fuzz_target }}
53
+ cargo fuzz run ${{ matrix.fuzz_target }} -- -max_total_time=$fuzz_time
54
+
55
+ - name : Upload fuzzing artifacts on failure
56
+ uses : actions/upload-artifact@v4
57
+ if : failure()
58
+ with :
59
+ name : fuzzing-artifacts-${{ matrix.fuzz_target }}-${{ github.sha }}
60
+ path : fuzz/artifacts
61
+
62
+ # TODO: add a verify-execution job similar to rust-bitcoin's one
You can’t perform that action at this time.
0 commit comments