Skip to content

Commit

Permalink
add validator to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Funkatronics committed Jun 6, 2024
1 parent 401ce9c commit 30c303c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/actions/install-solana/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Install Solana

inputs:
solana_version:
description: Version of Solana to install
required: true

runs:
using: "composite"
steps:
- name: Cache Solana Install
if: ${{ !env.ACT }}
id: cache-solana-install
uses: actions/cache@v2
with:
path: "$HOME/.local/share/solana/install/releases/${{ inputs.solana_version }}"
key: ${{ runner.os }}-Solana-v${{ inputs.solana_version }}

- name: Install Solana
if: ${{ !env.ACT }} && steps.cache-solana-install.cache-hit != 'true'
run: |
sh -c "$(curl -sSfL https://release.solana.com/v${{ inputs.solana_version }}/install)"
shell: bash

- name: Set Active Solana Version
run: |
rm -f "$HOME/.local/share/solana/install/active_release"
ln -s "$HOME/.local/share/solana/install/releases/${{ inputs.solana_version }}/solana-release" "$HOME/.local/share/solana/install/active_release"
shell: bash

- name: Add Solana bin to Path
run: |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
shell: bash

- name: Verify Solana install
run: |
solana --version
shell: bash
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
solana: ["1.18.14"]

steps:
- name: Checkout
Expand All @@ -26,11 +29,16 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: Install Solana
uses: ./.github/actions/install-solana
with:
solana_version: ${{ matrix.solana }}

# Build
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Test
run: ./gradlew build
run: ./gradlew build -PlocalValidator=true

- name: Save Test Reports
if: failure()
Expand Down

0 comments on commit 30c303c

Please sign in to comment.