Skip to content

Update solana ledger command for autosnapshot in 1.16 (#98) #472

Update solana ledger command for autosnapshot in 1.16 (#98)

Update solana ledger command for autosnapshot in 1.16 (#98) #472

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
SOLANA_CLI_VERSION: 1.16.16
jobs:
build-and-test:
name: Build and test programs
runs-on: big-runner-1
steps:
# Setup
- uses: actions/checkout@v2
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: actions/cache@v2
name: Cache Cargo registry + index
id: cache-anchor
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./mev-programs/target/
key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install --git https://github.com/coral-xyz/anchor --tag v0.28.0 anchor-cli --locked --force
- name: Install yarn dependencies
working-directory: ./mev-programs
run: yarn
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-04-19-x86_64-unknown-linux-gnu
components: rustfmt, clippy
- name: clippy
working-directory: ./mev-programs
run: cargo +nightly-2023-04-19 clippy
shell: bash
# Build IDLs
- name: Build jito_tip_distribution
working-directory: ./mev-programs
run: anchor build --idl idl --program-name jito_tip_distribution
- name: Build jito_tip_payment
working-directory: ./mev-programs
run: anchor build --idl idl --program-name jito_tip_payment
# Test
- name: Run Anchor test
working-directory: ./mev-programs
run: anchor test
# Make sure no uncommitted changes
- name: Check for diff
run: git diff --exit-code
# verified-build:
# name: Build Verifiable Artifact
# runs-on: big-runner-1
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# # --force because the cargo cache has it saved
# - name: Install Solana Verify
# run: |
# cargo install solana-verify --force
# solana-verify --version
#
# - name: Verifiable Build
# working-directory: ./mev-programs
# run: |
# solana-verify build --library-name jito_tip_distribution
# solana-verify build --library-name jito_tip_payment
#
# - name: Upload Artifact
# uses: actions/upload-artifact@v3
# with:
# name: build
# path: |
# mev-programs/target/deploy/jito_tip_distribution.so
# mev-programs/target/deploy/jito_tip_payment.so
# mev-programs/target/idl/jito_tip_distribution.json
# mev-programs/target/idl/jito_tip_payment.json