Skip to content

Commit

Permalink
solana-ibc: add build-sbf to GitHub Actions (#88)
Browse files Browse the repository at this point in the history
Adding ‘cargo build-sbf’ CI step which uses the solana-cli to run the
program in Solana environment.  This enables us to catch any bugs while
building the Solana program.  Ideally, we should run the tests which
requires Anchor CLI and takes quite a bit of time to install and run
the tests.  So for the time being, building the program successfully
using SBF should suffice.
  • Loading branch information
dhruvja authored Nov 14, 2023
1 parent 5063b56 commit b2f0eb4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- master

env:
SOLANA_VERSION: v1.16.3

jobs:
misc:
name: Miscellaneous checks
Expand Down Expand Up @@ -35,6 +38,27 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings

solana-build:
name: Build SBF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt

- name: Install Solana CLI
run: |
set -eux
curl -sSfL https://release.solana.com/$SOLANA_VERSION/install | sh
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
cp solana/solana-ibc/keypair.json ~/.config/solana/id.json
- name: Run build-sbf
run: cargo build-sbf

stable:
name: Rust tests
runs-on: ubuntu-latest
Expand Down

0 comments on commit b2f0eb4

Please sign in to comment.