From b2f0eb4eb36b9c4f927e402e95466b72ecd8753a Mon Sep 17 00:00:00 2001 From: Dhruv D Jain Date: Tue, 14 Nov 2023 13:51:51 +0530 Subject: [PATCH] solana-ibc: add `build-sbf` to GitHub Actions (#88) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/master.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ddafa227..4928d217 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -8,6 +8,9 @@ on: branches: - master +env: + SOLANA_VERSION: v1.16.3 + jobs: misc: name: Miscellaneous checks @@ -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