Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
77 changes: 77 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Benchmarks

on:
pull_request:
paths:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "program/**"
- "cu-bench/**"
- "client/**"
- "interface/**"
- "instruction-macros/**"
- "price/**"
- "services/**"
- "transaction-parser/**"
- ".github/workflows/bench.yml"
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: v3.1.9

jobs:
bench:
name: CU Benchmarks
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.30.3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- uses: dtolnay/rust-toolchain@1.86.0
- uses: Swatinem/rust-cache@v2
- run: pnpm install --frozen-lockfile

- name: Cache Solana toolchain
id: solana-cache
uses: actions/cache@v4
with:
path: |
~/.local/share/solana/install
~/.cache/solana
key: solana-${{ env.SOLANA_VERSION }}-${{ runner.os }}

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

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

- run: solana --version

- name: Bench dropset
run: pnpm bench:dropset
- name: Bench manifest
run: pnpm bench:manifest
- name: Bench phoenix
run: pnpm bench:phoenix
- name: Bench pack-orders
run: pnpm bench:pack-orders
- name: Bench to-order-info
run: pnpm bench:to-order-info
110 changes: 110 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CI
Comment thread
ethanterrero marked this conversation as resolved.
Outdated

on:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings

jobs:
lint-ts:
name: Lint (TS / Biome)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.30.3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint:ts

lint-rust:
name: Lint (Rust / clippy + rustfmt)
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-04-15
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: cargo +nightly fmt --check
run: cargo +nightly fmt --all -- --check
- name: cargo +nightly clippy -D warnings
run: cargo +nightly clippy --workspace --all-targets --locked -- -D warnings

typecheck-ts:
name: Typecheck (TS)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.30.3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm check:ts
- run: pnpm check:ts:test

check-rust:
name: Check (Rust)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.86.0
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --all-targets --locked

test-ts:
name: Test (TS)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.30.3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test:ts

test-rust:
name: Test (Rust)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.86.0
- uses: Swatinem/rust-cache@v2
Comment thread
ethanterrero marked this conversation as resolved.
Outdated
# cu-bench-* tests load pre-built .so files via mollusk; they run in the
# bench workflow with the Solana toolchain installed.
- run: >
cargo test --workspace --locked
--exclude cu-bench-dropset
--exclude cu-bench-tests
--exclude cu-bench-pack-orders
--exclude cu-bench-to-order-info
Loading