Initial skeleton for fuzzing infrastructure #7
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
# Smoke test to build fuzz targets. | |
# Deserves its own action given that it depends on nightly | |
# and there's currently no way to define multiple toolchains through the | |
# `rust-toolchain.toml` configuration file. | |
name: Build Fuzz Targets | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
check-fuzz: | |
name: Build fuzz targets | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read pinned nightly version | |
id: nightly_version | |
shell: bash | |
run: | | |
NIGHTLY_VERSION=$(cat pinned-nightly-version) | |
echo "::set-output name=nightly_version::$NIGHTLY_VERSION" | |
- name: Read cargo fuzz version | |
id: cargo_fuzz_version | |
shell: bash | |
run: | | |
CARGO_FUZZ_VERSION=$(cat pinned-cargo-fuzz-version) | |
echo "::set-output name=cargo_fuzz_version::$CARGO_FUZZ_VERSION" | |
- name: Install nightly | |
run: rustup install ${{ steps.nightly_version.outputs.nightly_version }} | |
- name: Install cargo fuzz | |
run: cargo install cargo-fuzz --version=${{ steps.cargo_fuzz_version.outputs.cargo_fuzz_version }} | |
- name: Build fuzz targets | |
run: cargo +${{ steps.nightly_version.outputs.nightly_version }} fuzz build --dev | |
- name: Lint | |
run: cargo +${{ steps.nightly_version.outputs.nightly_version }} clippy --package=javy-fuzz -- -D warnings | |