Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/actions/solana/install-solana/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Install Solana"
description: "Installs Solana CLI tools at a specified version"
inputs:
solana-version:
description: "Solana version to install (e.g., v2.2.16)"
required: true

runs:
using: "composite"
steps:
- name: Cache Solana CLI
id: cache-solana
uses: actions/cache@v4
with:
path: ~/.local/share/solana/install
key: solana-${{ inputs.solana-version }}-${{ runner.os }}

- name: Install Solana CLI
if: steps.cache-solana.outputs.cache-hit != 'true'
shell: bash
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/${{ inputs.solana-version }}/install)"

- name: Add Solana to PATH
shell: bash
run: |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH

- name: Verify Solana Installation
shell: bash
run: |
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
solana --version
105 changes: 105 additions & 0 deletions .github/workflows/trident-fuzz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Trident Fuzz Tests

on:
workflow_dispatch:
pull_request:
branches:
- develop
- master

env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: "v3.1.9"
TRIDENT_VERSION: "0.13.0-rc.2"

jobs:
build:
name: Build Programs
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
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

- name: Install Solana
uses: ./.github/actions/solana/install-solana
with:
solana-version: ${{ env.SOLANA_VERSION }}

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "trident-build"

- name: Build All Programs
run: make build-all

- name: Upload Program Artifacts
uses: actions/upload-artifact@v4
with:
name: program-binaries
path: target/deploy/*.so
retention-days: 1

fuzz-tests:
name: Fuzz - ${{ matrix.test.name }}
needs: build
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
test:
- name: "fuzz_0"
target: "fuzz_0"
- name: "fuzz_1"
target: "fuzz_1"
- name: "fuzz_2"
target: "fuzz_2"
- name: "fuzz_3"
target: "fuzz_3"
- name: "fuzz_launchpad"
target: "fuzz_launchpad"
- name: "fuzz_pbpp"
target: "fuzz_pbpp"
- name: "fuzz_mint_governor"
target: "fuzz_mint_governor"

steps:
- uses: actions/checkout@v4
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

- name: Download Program Artifacts
uses: actions/download-artifact@v4
with:
name: program-binaries
path: target/deploy

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "trident-fuzz-${{ matrix.test.target }}"
workspaces: |
./trident-tests

- name: Install Trident
run: cargo install trident-cli --version ${{ env.TRIDENT_VERSION }}

- name: Run Fuzz Test
working-directory: trident-tests
run: trident fuzz run ${{ matrix.test.target }} -e invariants

checks:
name: Fuzz Tests (Checks)
needs: fuzz-tests
runs-on: ubuntu-24.04
steps:
- run: echo "All fuzz tests completed successfully"
Loading