Skip to content

Commit 4590488

Browse files
committed
Merge #683: CI: Run fuzzer daily
44ddbe3 CI: Run fuzzer daily (Tobin C. Harding) Pull request description: Update the `fuzz/generate-files.sh` script to mimic that in `rust-bitcoin` and generate a new fuzz job that runs the fuzz tests daily for an hour. Run the fuzz job the time that `rust-bitcoin` fuzz job finishes - I don't know if that matters. I still don't know if there are org wide limits or just repo limits but it doesn't hurt to run at a different time. ACKs for top commit: storopoli: ACK 44ddbe3 apoelstra: ACK 44ddbe3 Tree-SHA512: 6c6bbdeea56f1c06f3da13ebd72cf053ffe199e45be7ce688070e259aa75bced28ca716eebf9e8470de91411a589a3a356b2de6869ad8c1b2945de3d6768eccd
2 parents 3e74aae + 44ddbe3 commit 4590488

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed
File renamed without changes.

fuzz/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "descriptor-fuzz"
3-
edition = "2018"
3+
edition = "2021"
4+
rust-version = "1.56.1"
45
version = "0.0.1"
56
authors = ["Generated by fuzz/generate-files.sh"]
67
publish = false

fuzz/generate-files.sh

+14-13
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ source "$REPO_DIR/fuzz/fuzz-util.sh"
1111
cat > "$REPO_DIR/fuzz/Cargo.toml" <<EOF
1212
[package]
1313
name = "descriptor-fuzz"
14-
edition = "2018"
14+
edition = "2021"
15+
rust-version = "1.56.1"
1516
version = "0.0.1"
1617
authors = ["Generated by fuzz/generate-files.sh"]
1718
publish = false
@@ -40,13 +41,13 @@ done
4041
cat > "$REPO_DIR/.github/workflows/fuzz.yml" <<EOF
4142
# Automatically generated by fuzz/generate-files.sh
4243
name: Fuzz
43-
4444
on:
45-
push:
46-
branches:
47-
- master
48-
- 'test-ci/**'
49-
pull_request:
45+
schedule:
46+
# 5am every day UTC, this correlates to:
47+
# - 11pm PDT
48+
# - 7am CET
49+
# - 5pm AEDT
50+
- cron: '00 06 * * *'
5051
5152
jobs:
5253
fuzz:
@@ -55,26 +56,26 @@ jobs:
5556
strategy:
5657
fail-fast: false
5758
matrix:
59+
# We only get 20 jobs at a time, we probably don't want to go
60+
# over that limit with fuzzing because of the hour run time.
5861
fuzz_target: [
5962
$(for name in $(listTargetNames); do echo "$name,"; done)
6063
]
6164
steps:
6265
- name: Install test dependencies
6366
run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev
64-
- uses: actions/checkout@v2
65-
- uses: actions/cache@v2
67+
- uses: actions/checkout@v4
68+
- uses: actions/cache@v4
6669
id: cache-fuzz
6770
with:
6871
path: |
6972
~/.cargo/bin
7073
fuzz/target
7174
target
7275
key: cache-\${{ matrix.target }}-\${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
73-
- uses: actions-rs/toolchain@v1
76+
- uses: dtolnay/rust-toolchain@stable
7477
with:
75-
toolchain: '1.65'
76-
override: true
77-
profile: minimal
78+
toolchain: '1.65.0'
7879
- name: fuzz
7980
run: cd fuzz && ./fuzz.sh "\${{ matrix.fuzz_target }}"
8081
- run: echo "\${{ matrix.fuzz_target }}" >executed_\${{ matrix.fuzz_target }}

0 commit comments

Comments
 (0)