Skip to content

Commit 351ffa8

Browse files
committed
Merge #684: Follow up from cron-daily-fuzz PR
bd1df30 Sort fuzz files when finding (Tobin C. Harding) 73d81e5 Follow up from cron-daily-fuzz PR (Tobin C. Harding) Pull request description: I royally botched up PR #683 which changed fuzzing to run daily, fix it up by doing: - Use the correct yaml file name in `generate-files.sh`. - Actually run `generate-files.sh` to generate the yaml file. - Fix the time UTC comment (the other times were correctly set). ACKs for top commit: apoelstra: ACK bd1df30 Tree-SHA512: 2af4c030398a79d1de2b2b5d49a399806e21681e5783d97bc139deb6004fed6b34461fb3547070a767d6fff1f76421c775a0a7d1ddc1de05dc50a3d08682618d
2 parents 15ddc86 + bd1df30 commit 351ffa8

File tree

4 files changed

+35
-31
lines changed

4 files changed

+35
-31
lines changed

.github/workflows/cron-daily-fuzz.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Automatically generated by fuzz/generate-files.sh
22
name: Fuzz
3-
43
on:
5-
push:
6-
branches:
7-
- master
8-
- 'test-ci/**'
9-
pull_request:
4+
schedule:
5+
# 6am every day UTC, this correlates to:
6+
# - 11pm PDT
7+
# - 7am CET
8+
# - 5pm AEDT
9+
- cron: '00 06 * * *'
1010

1111
jobs:
1212
fuzz:
@@ -15,33 +15,33 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
# We only get 20 jobs at a time, we probably don't want to go
19+
# over that limit with fuzzing because of the hour run time.
1820
fuzz_target: [
19-
roundtrip_semantic,
21+
compile_descriptor,
2022
parse_descriptor,
2123
parse_descriptor_secret,
24+
roundtrip_concrete,
25+
roundtrip_descriptor,
2226
roundtrip_miniscript_script,
2327
roundtrip_miniscript_str,
24-
roundtrip_descriptor,
25-
roundtrip_concrete,
26-
compile_descriptor,
28+
roundtrip_semantic,
2729
]
2830
steps:
2931
- name: Install test dependencies
3032
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
31-
- uses: actions/checkout@v2
32-
- uses: actions/cache@v2
33+
- uses: actions/checkout@v4
34+
- uses: actions/cache@v4
3335
id: cache-fuzz
3436
with:
3537
path: |
3638
~/.cargo/bin
3739
fuzz/target
3840
target
3941
key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
40-
- uses: actions-rs/toolchain@v1
42+
- uses: dtolnay/rust-toolchain@stable
4143
with:
42-
toolchain: '1.65'
43-
override: true
44-
profile: minimal
44+
toolchain: '1.65.0'
4545
- name: fuzz
4646
run: cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}"
4747
- run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }}

fuzz/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ miniscript = { path = "..", features = [ "compiler" ] }
1616
regex = "1.0"
1717

1818
[[bin]]
19-
name = "roundtrip_semantic"
20-
path = "fuzz_targets/roundtrip_semantic.rs"
19+
name = "compile_descriptor"
20+
path = "fuzz_targets/compile_descriptor.rs"
2121

2222
[[bin]]
2323
name = "parse_descriptor"
@@ -28,21 +28,21 @@ name = "parse_descriptor_secret"
2828
path = "fuzz_targets/parse_descriptor_secret.rs"
2929

3030
[[bin]]
31-
name = "roundtrip_miniscript_script"
32-
path = "fuzz_targets/roundtrip_miniscript_script.rs"
33-
34-
[[bin]]
35-
name = "roundtrip_miniscript_str"
36-
path = "fuzz_targets/roundtrip_miniscript_str.rs"
31+
name = "roundtrip_concrete"
32+
path = "fuzz_targets/roundtrip_concrete.rs"
3733

3834
[[bin]]
3935
name = "roundtrip_descriptor"
4036
path = "fuzz_targets/roundtrip_descriptor.rs"
4137

4238
[[bin]]
43-
name = "roundtrip_concrete"
44-
path = "fuzz_targets/roundtrip_concrete.rs"
39+
name = "roundtrip_miniscript_script"
40+
path = "fuzz_targets/roundtrip_miniscript_script.rs"
4541

4642
[[bin]]
47-
name = "compile_descriptor"
48-
path = "fuzz_targets/compile_descriptor.rs"
43+
name = "roundtrip_miniscript_str"
44+
path = "fuzz_targets/roundtrip_miniscript_str.rs"
45+
46+
[[bin]]
47+
name = "roundtrip_semantic"
48+
path = "fuzz_targets/roundtrip_semantic.rs"

fuzz/fuzz-util.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
REPO_DIR=$(git rev-parse --show-toplevel)
44

5+
# Sort order is effected by locale. See `man sort`.
6+
# > Set LC_ALL=C to get the traditional sort order that uses native byte values.
7+
export LC_ALL=C
8+
59
listTargetFiles() {
610
pushd "$REPO_DIR/fuzz" > /dev/null || exit 1
7-
find fuzz_targets/ -type f -name "*.rs"
11+
find fuzz_targets/ -type f -name "*.rs" | sort
812
popd > /dev/null || exit 1
913
}
1014

fuzz/generate-files.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ EOF
3838
done
3939

4040
# 2. Generate .github/workflows/fuzz.yml
41-
cat > "$REPO_DIR/.github/workflows/fuzz.yml" <<EOF
41+
cat > "$REPO_DIR/.github/workflows/cron-daily-fuzz.yml" <<EOF
4242
# Automatically generated by fuzz/generate-files.sh
4343
name: Fuzz
4444
on:
4545
schedule:
46-
# 5am every day UTC, this correlates to:
46+
# 6am every day UTC, this correlates to:
4747
# - 11pm PDT
4848
# - 7am CET
4949
# - 5pm AEDT

0 commit comments

Comments
 (0)