Skip to content

attempt to fix GHA

attempt to fix GHA #22

Workflow file for this run

name: Main
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
NODE_VERSION: 20
SOLANA_VERSION: 1.18.15
CARGO_CACHE: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
jobs:
test_programs:
name: Test programs
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup
with:
node: ${{ env.NODE_VERSION }}
solana: ${{ env.SOLANA_VERSION }}
- name: Cache test cargo dependencies
uses: actions/cache@v4
with:
path: ${{ env.CARGO_CACHE }}
key: ${{ runner.os }}-cargo-program-tests-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-program-tests
${{ runner.os }}-cargo-programs-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-programs
- name: Test programs
run: pnpm programs:test
# build_programs:
# name: Build programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# solana: ${{ env.SOLANA_VERSION }}
# - name: Cache cargo dependencies
# uses: actions/cache@v4
# with:
# path: ${{ env.CARGO_CACHE }}
# key: ${{ runner.os }}-cargo-programs-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: ${{ runner.os }}-cargo-programs
# - name: Build programs
# run: pnpm programs:build
# - name: Upload program builds
# uses: actions/upload-artifact@v4
# with:
# name: program-builds
# path: ./target/deploy/*.so
# if-no-files-found: error
# - name: Save all builds for clients
# uses: actions/cache/save@v4
# with:
# path: ./**/*.so
# key: ${{ runner.os }}-builds-${{ github.sha }}
# generate_idls:
# name: Check IDL generation
# needs: build_programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# solana: ${{ env.SOLANA_VERSION }}
# - name: Cache cargo dependencies
# uses: actions/cache@v4
# with:
# path: ${{ env.CARGO_CACHE }}
# key: ${{ runner.os }}-cargo-programs-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: ${{ runner.os }}-cargo-programs
# - name: Cache local cargo dependencies
# uses: actions/cache@v4
# with:
# path: |
# .cargo/bin/
# .cargo/registry/index/
# .cargo/registry/cache/
# .cargo/git/db/
# key: ${{ runner.os }}-cargo-local-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: ${{ runner.os }}-cargo-local
# - name: Generate IDLs
# run: pnpm generate:idls
# - name: Ensure working directory is clean
# run: test -z "$(git status --porcelain)"
#
# generate_clients:
# name: Check client generation
# needs: build_programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# solana: ${{ env.SOLANA_VERSION }}
# - name: Generate clients
# run: pnpm generate:clients
# - name: Ensure working directory is clean
# run: test -z "$(git status --porcelain)"
#
# test_js:
# name: Test JS client
# needs: build_programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# solana: ${{ env.SOLANA_VERSION }}
# - name: Restore all builds
# uses: actions/cache/restore@v4
# with:
# path: ./**/*.so
# key: ${{ runner.os }}-builds-${{ github.sha }}
# - name: Test JS client
# run: pnpm clients:js:test
#
# lint_js:
# name: Lint JS client
# needs: build_programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# - name: Lint JS client
# run: pnpm clients:js:lint
#
# test_rust:
# name: Test Rust client
# needs: build_programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# solana: ${{ env.SOLANA_VERSION }}
# - name: Cache Rust client dependencies
# uses: actions/cache@v4
# with:
# path: ${{ env.CARGO_CACHE }}
# key: ${{ runner.os }}-cargo-rust-client-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: ${{ runner.os }}-cargo-rust-client
# - name: Restore all builds
# uses: actions/cache/restore@v4
# with:
# path: ./**/*.so
# key: ${{ runner.os }}-builds-${{ github.sha }}
# - name: Test Rust client
# run: pnpm clients:rust:test
#
# lint_rust:
# name: Lint Rust client
# needs: build_programs
# runs-on: ubuntu-latest
# steps:
# - name: Git checkout
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup
# with:
# node: ${{ env.NODE_VERSION }}
# - name: Lint Rust client
# run: pnpm clients:rust:lint