Skip to content

Commit 99a7716

Browse files
committed
ci: split fuzz sanity check into separate parallel job
The sanity check (cargo test on fuzz targets) doesn't use the restored corpus and was blocking the actual fuzz run. Move it to a separate fuzz_sanity job so both run in parallel. AI tools were used in preparing this commit.
1 parent 7d82e14 commit 99a7716

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,21 @@ jobs:
205205
- name: Simulate docs.rs build
206206
run: ci/check-docsrs.sh
207207

208+
fuzz_sanity:
209+
runs-on: self-hosted
210+
env:
211+
TOOLCHAIN: 1.75
212+
steps:
213+
- name: Checkout source code
214+
uses: actions/checkout@v4
215+
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
216+
run: |
217+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
218+
- name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }}
219+
run: |
220+
cd fuzz
221+
RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz" cargo test --quiet --color always --lib --bins -j8
222+
208223
fuzz:
209224
runs-on: self-hosted
210225
env:
@@ -238,11 +253,6 @@ jobs:
238253
key: fuzz-corpus-refs/heads/main-${{ github.sha }}
239254
restore-keys: |
240255
fuzz-corpus-refs/heads/main-
241-
- name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }}
242-
run: |
243-
cd fuzz
244-
RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz" cargo test --verbose --color always --lib --bins -j8
245-
cargo clean
246256
- name: Run fuzzers
247257
run: cd fuzz && ./ci-fuzz.sh && cd ..
248258
- name: Upload honggfuzz corpus
@@ -308,7 +318,7 @@ jobs:
308318
TOR_PROXY="127.0.0.1:9050" RUSTFLAGS="--cfg=tor" cargo test --verbose --color always -p lightning-net-tokio
309319
310320
notify-failure:
311-
needs: [build-workspace, build-features, build-bindings, build-nostd, build-cfg-flags, build-sync, fuzz, linting, rustfmt, check_release, check_docs, benchmark, ext-test, tor-connect, coverage]
321+
needs: [build-workspace, build-features, build-bindings, build-nostd, build-cfg-flags, build-sync, fuzz_sanity, fuzz, linting, rustfmt, check_release, check_docs, benchmark, ext-test, tor-connect, coverage]
312322
if: failure() && github.ref == 'refs/heads/main'
313323
runs-on: ubuntu-latest
314324
permissions:

0 commit comments

Comments
 (0)