Merge BlockstreamResearch/rust-simplicity#271: bit machine: fix some … #70
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
# Automatically generated by fuzz/generate-files.sh | |
name: Fuzz | |
on: | |
push: | |
branches: | |
- master | |
- 'test-ci/**' | |
pull_request: | |
jobs: | |
fuzz: | |
name: Run Fuzz Target | |
if: ${{ !github.event.act }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
fuzz_target: [ | |
c_rust_merkle, | |
decode_natural, | |
decode_program, | |
parse_human, | |
] | |
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 | |
- name: Checkout Crate | |
uses: actions/checkout@v4 | |
- name: Use Rust Cache | |
uses: actions/cache@v4 | |
id: cache-fuzz | |
with: | |
path: | | |
~/.cargo/bin | |
fuzz/target | |
target | |
key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- name: Install Toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: '1.65.0' | |
- name: Run Fuzz Target | |
run: | | |
echo "Using RUSTFLAGS $RUSTFLAGS" | |
cd fuzz && cargo update && cargo update -p cc --precise 1.0.83 && ./fuzz.sh "${{ matrix.fuzz_target }}" | |
- name: Prepare Artifact | |
run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executed_${{ matrix.fuzz_target }} | |
path: executed_${{ matrix.fuzz_target }} | |
verify-execution: | |
name: Verify Execution of All Targets | |
if: ${{ !github.event.act }} | |
needs: fuzz | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Crate | |
uses: actions/checkout@v4 | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Display Structure of Downloaded Files | |
run: ls -R | |
- name: Write File With All Executed Targets | |
run: find executed_* -type f -exec cat {} + | sort > executed | |
- name: Compare Executed Targets With Available Targets | |
run: source ./fuzz/fuzz-util.sh && listTargetNames | sort | diff - executed |