Skip to content
Merged
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
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches: [ main ]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: mozilla-actions/sccache-action@v0.0.3
- name: Install toolchain
run: |
rustup toolchain install 1.83 --profile minimal --no-self-update
rustup default 1.83
cargo install --locked anchor-cli@0.31.1
sh -c "$(curl -sSfL https://release.solana.com/v2.3.0/install)" -- --no-modify-path
- name: Show versions
run: |
anchor --version
solana --version
rustc --version
cargo --version
- name: Build and test
run: |
export RUSTC_WRAPPER="$(which sccache)"
cargo test --manifest-path verify/Cargo.toml --no-default-features -- --nocapture
cargo test -p merkle-distributor --features test-sbf -- --nocapture

ci-lite:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-lite-${{ hashFiles('**/Cargo.lock') }}
- uses: mozilla-actions/sccache-action@v0.0.3
- name: Install toolchain
run: |
rustup toolchain install 1.83 --profile minimal --no-self-update
rustup default 1.83
cargo install --locked anchor-cli@0.31.1
sh -c "$(curl -sSfL https://release.solana.com/v2.3.0/install)" -- --no-modify-path
- name: Show versions
run: |
anchor --version
solana --version
rustc --version
cargo --version
- name: Run ci-lite tests
run: |
export RUSTC_WRAPPER="$(which sccache)"
cargo test --manifest-path verify/Cargo.toml --no-default-features -- --nocapture
cargo test -p merkle-distributor --features ci-lite -- --nocapture
6 changes: 3 additions & 3 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
anchor_version = "0.29.0"
solana_version = "1.16.9" # Solana version to use
anchor_version = "0.31.1"
solana_version = "2.3.0" # Solana version to use

[features]
seeds = true
Expand Down Expand Up @@ -30,4 +30,4 @@ merkle_distributor = "m1uqAm3yAagng3uqphvQ4rRAkRy17F4JX87pFemLBKv"
merkle_distributor = "m1uqAm3yAagng3uqphvQ4rRAkRy17F4JX87pFemLBKv"

[scripts]
test = "yarn mocha"
test = "npm test"
Loading
Loading