Skip to content

[2.8] Implement settle_trade instruction #36

[2.8] Implement settle_trade instruction

[2.8] Implement settle_trade instruction #36

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-clippy-
- run: cargo clippy --all-targets -- -D warnings -D clippy::unwrap_used
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-test-
# The integration tests load the compiled program from
# target/deploy/flux_dex.so, so the SBF toolchain must build it first.
- name: Install Solana CLI (cargo build-sbf)
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
- name: Cache SBF platform tools
uses: actions/cache@v4
with:
path: ~/.cache/solana
key: ${{ runner.os }}-sbf-tools
- name: Build SBF program
run: cargo build-sbf
- run: cargo test