💚 Pipelines revision #8
Workflow file for this run
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
name: Test Fuzz Tests | |
on: | |
workflow_dispatch: | |
pull_request: # Workflow can be triggered by either a manual dispatch or a pull request | |
env: | |
HONGGFUZZ_VERSION: 0.5.56 # Honggfuzz version to install in the environment | |
jobs: | |
checks: | |
# The 'checks' job waits for both 'simple-cpi-6' and 'arbitrary-limit-inputs-5' jobs to complete | |
runs-on: ubuntu-20.04 | |
needs: | |
- simple-cpi-6 | |
- arbitrary-limit-inputs-5 | |
steps: | |
- run: echo "Done" # Placeholder step once both required jobs are done | |
simple-cpi-6: | |
# Runs on an Ubuntu 20.04 runner | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout Repository # Checkout the repository to get access to the project files | |
# https://github.com/Swatinem/rust-cache | |
- name: Cache Rust and its Packages | |
# Caches Rust dependencies to avoid redundant downloads and speed up builds | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "fuzz" | |
shared-key: "trident-rust-cache" # Using a shared cache key for multiple jobs | |
- name: Setup Rust Environment | |
# Sets up the Rust environment (e.g., installing Rust and required components) | |
uses: ./.github/actions/setup-rust/ | |
- name: Install Trident | |
# Sets up the Trident | |
uses: ./.github/actions/setup-trident/ | |
- name: Setup Honggfuzz | |
# Sets up Honggfuzz, a fuzzing tool that will be used by Trident | |
uses: ./.github/actions/setup-honggfuzz/ | |
# Cache the target folder, which stores the build artifacts generated by the fuzzing process | |
- name: Cache Target Folder | |
uses: actions/cache@v3 | |
with: | |
path: examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzzing/hfuzz_target # Cache the folder where build artifacts are stored | |
key: target-${{ runner.os }}-simple-cpi-6 # Unique key for caching based on OS and test | |
# Run the fuzzing test using Trident in the simple-cpi-6 directory | |
- name: Test Fuzz | |
working-directory: examples/fuzz-tests/simple-cpi-6 # Set the working directory for the fuzzing test | |
run: trident fuzz run fuzz_0 # Run the fuzz test with trident | |
arbitrary-limit-inputs-5: | |
# Runs on an Ubuntu 20.04 runner for a different fuzz test | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout Repository # Checkout the repository | |
# https://github.com/Swatinem/rust-cache | |
- name: Cache Rust and its Packages | |
# Caches Rust dependencies to avoid redundant downloads and speed up builds | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "fuzz" # Using a locally shared cache key | |
shared-key: "trident-rust-cache" # Using a shared cache key for multiple jobs | |
- name: Setup Rust Environment | |
# Sets up the Rust environment (e.g., installing Rust and required components) | |
uses: ./.github/actions/setup-rust/ | |
- name: Install Trident | |
# Sets up the Trident | |
uses: ./.github/actions/setup-trident/ | |
- name: Setup Honggfuzz | |
# Sets up Honggfuzz, a fuzzing tool that will be used by Trident | |
uses: ./.github/actions/setup-honggfuzz/ | |
# Cache the target folder, which stores the build artifacts generated by the fuzzing process | |
- name: Cache Target Folder | |
uses: actions/cache@v3 | |
with: | |
path: examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzzing/hfuzz_target # Cache the folder where build artifacts are stored | |
key: target-${{ runner.os }}-arbitrary-limit-inputs-5 # Unique key for caching based on OS and test | |
# Run the fuzzing test using Trident in the arbitrary-limit-inputs-5 directory | |
- name: Test Fuzz | |
working-directory: examples/fuzz-tests/arbitrary-limit-inputs-5 # Set the working directory for the fuzzing test | |
run: trident fuzz run fuzz_0 # Run the fuzz test with trident |