-
Notifications
You must be signed in to change notification settings - Fork 156
59 lines (50 loc) · 1.79 KB
/
fuzz-bench.yml
File metadata and controls
59 lines (50 loc) · 1.79 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
54
55
56
57
58
59
name: Fuzz & Bench
on:
workflow_dispatch:
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: mozilla/actions/rust@27cbe8fb5d338c2861b787e5de10410559065db1 # v1.1.3
with:
version: nightly
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-fuzz
if: ${{ matrix.check == 'fuzz' }}
# cargo-fuzz must be compiled from source so it targets the native toolchain;
# binstall provides prebuilt binaries that may target a different architecture.
run: cargo install cargo-fuzz
- id: nss-version
uses: ./.github/actions/minimum-version
with:
directory: .
- uses: mozilla/actions/nss@27cbe8fb5d338c2861b787e5de10410559065db1 # v1.1.3
with:
minimum-version: ${{ steps.nss-version.outputs.minimum }}
token: ${{ secrets.GITHUB_TOKEN }}
- 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