forked from Chia-Network/clvm_tools_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.2 KB
/
build-test.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
43
44
45
46
47
48
49
50
51
52
53
# Thanks: clvm_rs' github actions.
name: Build
on:
push:
branches:
- '**'
release:
types: [published]
pull_request:
branches:
- '**'
permissions:
id-token: write
contents: read
jobs:
fuzz_targets:
name: Run fuzz targets
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
python: [3.7]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: fmt
run: |
cd fuzz
cargo fmt -- --files-with-diff --check
- name: clippy
run: |
cd fuzz
cargo clippy
- name: cargo-fuzz
run: cargo +nightly install cargo-fuzz
# TODO: it would be nice to save and restore the corpus between runs
- name: build corpus
run: |
cd tools
cargo run --bin generate-fuzz-corpus
- name: build
run: cargo fuzz list | xargs -I "%" sh -c "cargo +nightly fuzz run % -- -max_total_time=30 || exit 255"