-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
37d285c Run fuzzer in CI (Tobin C. Harding) bd4e8e2 Rename travis-fuzz.sh to fuzz.sh (Tobin C. Harding) 18214b2 Do not manually check for ascii range (Tobin C. Harding) Pull request description: As we do in `rust-bitcoin` run the fuzzer for each PR and each push. Fix: #43 ACKs for top commit: apoelstra: ACK 37d285c Tree-SHA512: d98fcc970f46d34e0b9331643648684ef77787e3e21d25884c093d9f049f8a60b09b6d4771f73230ced57db93fd92810e58f342bcca2ed36dcbb9bab7abd79e3
- Loading branch information
Showing
5 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Fuzz | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
fuzz: | ||
if: ${{ !github.event.act }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
fuzz_target: [decode_rnd, encode_decode] | ||
steps: | ||
- name: Install test dependencies | ||
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 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
id: cache-fuzz | ||
with: | ||
path: | | ||
~/.cargo/bin | ||
fuzz/target | ||
target | ||
key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | ||
- name: Checkout Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: fuzz | ||
run: cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}" | ||
- run: echo "${{ matrix.fuzz_target }}.rs" >executed_${{ matrix.fuzz_target }} | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: executed_${{ matrix.fuzz_target }} | ||
path: executed_${{ matrix.fuzz_target }} | ||
|
||
verify-execution: | ||
if: ${{ !github.event.act }} | ||
needs: fuzz | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v2 | ||
- name: Display structure of downloaded files | ||
run: ls -R | ||
- run: find executed_* -type f -exec cat {} + | sort > executed | ||
- run: ls fuzz/fuzz_targets | sort > expected | ||
- run: diff expected executed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters