-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial skeleton for fuzzing infrastructure #699
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
297a56a
Initial fuzzing skeleton
saulecabrera 2184ede
Add README
saulecabrera e1a8622
Build fuzz targets in CI
saulecabrera 271a286
Revert runtime configuration changes
saulecabrera ed08322
Add `check-fuzz.yml`
saulecabrera 1de10bd
Fix typo
saulecabrera 0acd255
Fix `check-fuzz` format
saulecabrera eb9e873
Add linting
saulecabrera ab9342d
Fixes
saulecabrera 9753614
Fix formatting in check-fuzz.yml
saulecabrera eee0719
Parametrize cargo fuzz and nightly version
saulecabrera 9f4e63c
Split steps to read versions
saulecabrera 43d95ac
Fix typo in rustup install nightly
saulecabrera 2bb3d4f
Fix typo in cargo install cargo-fuzz
saulecabrera 21aec02
Improve nightly installation step
saulecabrera 84ebc7e
Use rustup override
saulecabrera 7d94ba8
Drop clippy from fuzz
saulecabrera e91e92f
Fix `lint` newlines
saulecabrera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,42 @@ | ||
# 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 }} | ||
rustup override set ${{ steps.nightly_version.outputs.nightly_version }} | ||
rustup component add clippy | ||
|
||
- name: Install cargo fuzz | ||
run: cargo install cargo-fuzz --version=${{ steps.cargo_fuzz_version.outputs.cargo_fuzz_version }} | ||
|
||
- name: Build fuzz targets | ||
run: cargo fuzz build --dev |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for putting this and the cargo fuzz version in a file instead of using a top-level
env
for both? I don't see them referenced outside this file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is very subjective: I feel that's easier to update the version when it's defined at the root rather than having to modify the action itself.