-
Notifications
You must be signed in to change notification settings - Fork 55
98 lines (86 loc) · 2.82 KB
/
fuzz.yml
File metadata and controls
98 lines (86 loc) · 2.82 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Test Fuzz Tests
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'documentation/**'
- '.github/**'
branches:
- develop
- master
env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: "v2.2.16"
RUST_VERSION: "1.86"
jobs:
fuzz-tests:
name: Fuzz Tests - ${{ matrix.test.name }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
test:
- name: "Hello World"
path: "examples/hello_world"
cache-key: "hello-world"
- name: "Simple CPI"
path: "examples/cpi"
cache-key: "simple-cpi"
- name: "Trident Benchmark Maze 0"
path: "examples/trident-benchmark/maze_0"
cache-key: "maze-0"
- name: "Trident Benchmark Maze 1"
path: "examples/trident-benchmark/maze_1"
cache-key: "maze-1"
- name: "Trident Benchmark Maze 2"
path: "examples/trident-benchmark/maze_2"
cache-key: "maze-2"
- name: "Trident Benchmark Maze 3"
path: "examples/trident-benchmark/maze_3"
cache-key: "maze-3"
- name: "Trident Benchmark Maze 4"
path: "examples/trident-benchmark/maze_4"
cache-key: "maze-4"
- name: "Metaplex CPI"
path: "examples/metaplex"
cache-key: "metaplex"
- name: "Token"
path: "examples/token"
cache-key: "token"
steps:
- uses: actions/checkout@v3
name: Checkout Repository
- name: Install system packages
run: sudo apt-get update && sudo apt-get install -y build-essential libudev-dev protobuf-compiler libprotobuf-dev
shell: bash
- uses: hubbleprotocol/solana-setup-action@v0.5
id: solana-setup
with:
solana-version: ${{ env.SOLANA_VERSION }}
rust-version: ${{ env.RUST_VERSION }}
rust-shared-key: "trident-testing"
- name: Rust Cache
id: rust-cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "trident-fuzzing"
key: fuzz-tests-${{ runner.os }}-${{ matrix.test.cache-key }}
workspaces: |
./${{ matrix.test.path }}
./${{ matrix.test.path }}/trident-tests
- name: Install Trident
if: steps.rust-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-trident/
- name: Build Solana Program
working-directory: ${{ matrix.test.path }}
run: cargo build-sbf
- name: Run Fuzz Test
working-directory: ${{ matrix.test.path }}/trident-tests
run: trident fuzz run fuzz_0
checks:
name: Fuzz Tests (Checks)
needs: fuzz-tests
runs-on: ubuntu-24.04
steps:
- run: echo "All fuzz tests completed successfully"