Gateway Solana: Update to solana 1.16 #2744
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 Typescript | |
on: | |
push: | |
paths: | |
- "solana/**" | |
- ".github/**" | |
pull_request: | |
jobs: | |
solana-build: | |
name: Build, lint the solana libraries on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: ["16.x"] | |
os: [ubuntu-latest] | |
defaults: | |
run: | |
working-directory: ./solana | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache node dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./node_modules | |
key: yarn-solana-${{ hashFiles('solana/yarn.lock') }} | |
- name: NPM login | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
- name: Install | |
run: yarn install | |
- name: Build | |
run: yarn workspaces run build | |
- name: Lint | |
run: yarn workspaces run lint | |
solana-ts-tests: | |
name: Test the solana typescript | |
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"] | |
node: ["16.x"] | |
solana: ["stable"] | |
os: [ubuntu-latest] | |
defaults: | |
run: | |
working-directory: ./solana | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Rust ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- 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: | | |
sh -c "$(curl -sSfL https://release.solana.com/${{ matrix.solana }}/install)" | |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" | |
solana --version | |
- name: Build Solana program | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build-sbf | |
args: --manifest-path solana/Cargo.toml | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache node dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./node_modules | |
key: yarn-solana-${{ hashFiles('solana/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn | |
- name: Build dependencies | |
run: yarn workspaces run build | |
- name: Run tests | |
run: yarn test |