-
Notifications
You must be signed in to change notification settings - Fork 114
42 lines (37 loc) · 1.31 KB
/
check-fuzz.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 "nightly_version=$NIGHTLY_VERSION" >> "$GITHUB_OUTPUT"
- name: Read cargo fuzz version
id: cargo_fuzz_version
shell: bash
run: |
CARGO_FUZZ_VERSION=$(cat pinned-cargo-fuzz-version)
echo "cargo_fuzz_version=$CARGO_FUZZ_VERSION" >> "$GITHUB_OUTPUT"
- 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