-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (44 loc) · 1.42 KB
/
fuzz-bench.yml
File metadata and controls
53 lines (44 loc) · 1.42 KB
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
43
44
45
46
47
48
49
50
51
52
53
name: Fuzz & Bench
on:
workflow_dispatch:
pull_request:
branches: ["main"]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
jobs:
fuzz-bench:
name: Check that the fuzz and bench targets work
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15] # FIXME: ubuntu-24.04-arm has issues
check: [fuzz, bench]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: ./.github/actions/rust
with:
version: nightly
tools: ${{ matrix.check == 'fuzz' && 'cargo-fuzz' || ''}}
token: ${{ secrets.GITHUB_TOKEN }}
- id: nss-version
run: echo "minimum=$(cat min_version.txt)" >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/nss
with:
minimum-version: ${{ steps.nss-version.outputs.minimum }}
- if: ${{ matrix.check == 'fuzz' }}
env:
UBUNTU: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
cargo fuzz build --dev
for fuzzer in $(cargo fuzz list); do
cargo fuzz run --dev --sanitizer none "$fuzzer" -- -runs=1
done
- if: ${{ matrix.check == 'bench' }}
run: cargo bench --features bench --profile dev -- --profile-time 1