|
# Automatically generated by fuzz/generate-files.sh |
|
name: Fuzz |
|
|
|
on: |
|
push: |
|
branches: |
|
- master |
|
- 'test-ci/**' |
|
pull_request: |
|
|
|
jobs: |
|
fuzz: |
|
if: ${{ !github.event.act }} |
|
runs-on: ubuntu-20.04 |
|
strategy: |
|
fail-fast: false |
|
matrix: |
|
fuzz_target: [ |
|
roundtrip_miniscript_str, |
|
roundtrip_miniscript_script, |
|
parse_descriptor, |
|
roundtrip_semantic, |
|
parse_descriptor_secret, |
|
roundtrip_descriptor, |
|
roundtrip_concrete, |
|
compile_descriptor, |
|
roundtrip_confidential, |
|
] |
|
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') }} |
|
- uses: actions-rs/toolchain@v1 |
|
with: |
|
toolchain: 1.65 |
|
override: true |
|
profile: minimal |
|
- name: fuzz |
|
run: | |
|
if [[ "${{ matrix.fuzz_target }}" =~ ^bitcoin ]]; then |
|
export RUSTFLAGS='--cfg=hashes_fuzz --cfg=secp256k1_fuzz' |
|
fi |
|
echo "Using RUSTFLAGS $RUSTFLAGS" |
|
cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}" |
|
- run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }} |
|
- uses: actions/upload-artifact@v4 |
|
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@v4 |
|
- name: Display structure of downloaded files |
|
run: ls -R |
|
- run: find executed_* -type f -exec cat {} + | sort > executed |
|
- run: source ./fuzz/fuzz-util.sh && listTargetNames | sort | diff - executed |