Skip to content

CI: Use install script from solana-zig #17

CI: Use install script from solana-zig

CI: Use install script from solana-zig #17

Workflow file for this run

name: Build and test hello-world program
on: [pull_request, push]
env:
ZIG_SOLANA_VERSION: v1.39
ZIG_SOLANA_DIR: zig-solana
jobs:
program:
name: Build and test helloworld
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/zig
$ZIG_SOLANA_DIR
key: zig-solana-${{ hashFiles('./program-test/Cargo.lock') }}-$ZIG_SOLANA_VERSION
- name: Download zig-solana compiler
shell: bash
run: ZIG_SOLANA_VERSION=v1.39 ./sol/install-zig-solana.sh $ZIG_SOLANA_DIR
- name: Test program
shell: bash
run: |
for i in $(seq 1 5)
do
$ZIG build test --summary all --verbose && break || sleep 1
done
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.0
- name: Install build deps
shell: bash
run: |
sudo apt update
sudo apt install protobuf-compiler -y
- name: Build and test program
shell: bash
run: ./program-test/test.sh $ZIG_SOLANA_DIR/zig