Skip to content

solana-zig: Update to latest main #18

solana-zig: Update to latest main

solana-zig: Update to latest main #18

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:
unit-test:
name: Run helloworld unit tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: |
$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
integration-test:
name: Run helloworld integration tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
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: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.0
- name: Install build deps
shell: bash
run: ./sol/program-test/install-build-deps.sh
- name: Build and test program
shell: bash
run: ./program-test/test.sh