Skip to content

Commit

Permalink
solana: add basic CI for Solana integration branch
Browse files Browse the repository at this point in the history
  • Loading branch information
deekerno committed Feb 21, 2024
1 parent f1a5568 commit 2432f39
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Solana Integration Checks
on:
push:
branches:
- solana/integration
pull_request: null

env:
RUSTC_VERSION: 1.76.0
jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
cargo-clippy-and-lint:
name: Clippy Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTC_VERSION }}
components: clippy, rustfmt
- name: cargo fmt --check
run: cargo fmt --check
working-directory: ./solana
- name: cargo clippy --locked --no-deps --all-targets --features testnet -- -D warnings
run: cargo clippy --locked --no-deps --all-targets --features testnet -- -D warnings
working-directory: ./solana
- name: cargo clippy --locked --no-deps --all-targets --features localnet -- -D warnings
run: cargo clippy --locked --no-deps --all-targets --features localnet -- -D warnings
working-directory: ./solana
test:
name: Run Tests
runs-on: ubuntu-latest
# Anchor Docker image: https://www.anchor-lang.com/docs/verifiable-builds#images
container: backpackapp/build:v0.29.0
steps:
- uses: actions/checkout@v4
- name: Install NPM dependencies
run: npm ci
working-directory: ./solana
- name: cargo test --features localnet --no-default-features
run: cargo test --features localnet --no-default-features
working-directory: ./solana
- name: cargo test --features testnet --no-default-features
run: cargo test --features testnet --no-default-features
working-directory: ./solana
- name: anchor build --arch sbf -- --features testnet
run: anchor build --arch sbf -- --features testnet
working-directory: ./solana
- name: Create artifact directory
run: mkdir -p ts/tests/artifacts
working-directory: ./solana
- name: Copy Testnet Matching Engine Object
run: cp target/deploy/matching_engine.so ts/tests/artifacts/testnet_matching_engine.so
working-directory: ./solana
- name: Copy Testnet Token Router Object
run: cp target/deploy/token_router.so ts/tests/artifacts/testnet_token_router.so
working-directory: ./solana
- name: Copy Upgrade Manager Object
run: cp target/deploy/upgrade_manager.so ts/tests/artifacts/testnet_upgrade_manager.so
working-directory: ./solana
- name: anchor build --arch sbf -- --features integration-test
run: anchor build --arch sbf -- --features integration-test
working-directory: ./solana
- name: anchor test --skip-build
run: anchor test --skip-build
working-directory: ./solana

0 comments on commit 2432f39

Please sign in to comment.