Gateway Solana: Update to solana 1.16 #1876
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Solana Rust | |
on: | |
push: | |
paths: | |
- 'solana/program/**' | |
- 'solana/integration-lib/**' | |
- 'solana/Cargo.toml' | |
- 'solana/Cargo.lock' | |
- 'solana/Xargo.toml' | |
- '.github/**' | |
pull_request: | |
jobs: | |
solana-gateway-program-lint: | |
name: Lint the solana rust code on ${{ matrix.rust }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# This should match rust-toolchain.toml ( actions-rs/toolchain@v1 does not pick it up directly in monorepos ) | |
rust: [ '1.69' ] | |
os: [ ubuntu-latest ] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Rust ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
default: true | |
- name: Cache build dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./solana/target | |
key: cargo-lint-${{ hashFiles('solana/Cargo.lock') }} | |
- name: Run fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --manifest-path solana/Cargo.toml --all -- --check | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --tests --features test-sbf --manifest-path solana/Cargo.toml -- --deny=warnings | |
solana-gateway-program-build: | |
name: Build and test the solana rust code on Solana ${{ matrix.solana }}, Rust ${{ matrix.rust }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
rust: [ '1.69' ] # This should match rust-toolchain.toml ( actions-rs/toolchain@v1 does not pick it up directly in monorepos ) | |
solana: [ 'stable' ] | |
os: [ ubuntu-latest ] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Rust ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
default: true | |
- name: Cache build dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./solana/target | |
key: cargo-build-v2-${{ hashFiles('solana/Cargo.lock') }} | |
- name: Cache Solana version | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache | |
key: solana-${{ matrix.solana }} | |
- name: Install Solana | |
run: | | |
curl -v https://release.solana.com/${{ matrix.solana }}/install | |
sh -c "$(curl -sSfL https://release.solana.com/${{ matrix.solana }}/install)" | |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | |
- name: Run unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --manifest-path solana/Cargo.toml | |
- name: Build the program and run functional tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test-sbf | |
args: --manifest-path solana/Cargo.toml |