Skip to content

feat: upgrade anchor version to 0.29.0 #1053

feat: upgrade anchor version to 0.29.0

feat: upgrade anchor version to 0.29.0 #1053

Workflow file for this run

name: E2E
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: "1.17.0"
RUST_TOOLCHAIN: "1.68.0-dev"
jobs:
sdk:
runs-on: ubuntu-latest
name: Build the SDK
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
- name: Setup Cachix
uses: cachix/cachix-action@v10
with:
name: quarry
extraPullNames: saber
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Parse IDLs
run: nix shell .#ci --command ./scripts/parse-idls.sh
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Install Yarn dependencies
run: nix shell .#ci --command yarn install
- run: nix shell .#ci --command ./scripts/generate-idl-types.sh
- run: nix shell .#ci --command yarn build
- run: nix shell .#ci --command yarn typecheck
- run: nix shell .#ci --command yarn lint
- run: nix shell .#ci --command yarn dlx @yarnpkg/doctor
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install Cachix
- uses: cachix/install-nix-action@v17
- name: Setup Cachix
uses: cachix/cachix-action@v10
with:
name: quarry
extraPullNames: saber
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
# Install Rust and Anchor
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v1
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config build-essential libudev-dev
# Install Solana
- name: Cache Solana binaries
id: solana-cache
uses: actions/cache@v3
with:
path: |
~/.cache/solana
~/.local/share/solana/install
key: ${{ runner.os }}-${{ env.SOLANA_VERSION }}
- name: Install Solana
if: steps.solana-cache.outputs.cache-hit != 'true'
run: |
nix shell .#ci --command solana-install init ${{ env.SOLANA_VERSION }}
- name: Setup Solana Path
run: |
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
# Run build
- name: Build program
run: nix shell .#ci --command anchor build
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- run: nix shell .#ci --command yarn install
- name: Generate IDL types
run: nix shell .#ci --command yarn idl:generate:nolint
- run: nix shell .#ci --command yarn build
- name: Run e2e tests
run: nix shell .#ci --command yarn test:e2e