Skip to content

Commit

Permalink
CI: Use install script from solana-zig
Browse files Browse the repository at this point in the history
  • Loading branch information
joncinque committed Mar 31, 2024
1 parent 4c5e38e commit 06adf0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [pull_request, push]

env:
ZIG_SOLANA_VERSION: v1.39
ZIG_SOLANA_DIR: zig-x86_64-linux-gnu-baseline
ZIG_SOLANA_DIR: zig-solana

jobs:
program:
Expand All @@ -26,15 +26,15 @@ jobs:

- name: Download zig-solana compiler
shell: bash
run: |
ZIG_SOLANA_RELEASE_URL=https://github.com/joncinque/zig-bootstrap-solana/releases/download/solana-$ZIG_SOLANA_VERSION
ZIG_SOLANA_TAR=zig-x86_64-linux-gnu.tar.bz2
curl --proto '=https' --tlsv1.2 -sSfOL $ZIG_SOLANA_RELEASE_URL/$ZIG_SOLANA_TAR
tar -xjf $ZIG_SOLANA_TAR
run: ZIG_SOLANA_VERSION=v1.39 ./sol/install-zig-solana.sh $ZIG_SOLANA_DIR

- name: Test program
shell: bash
run: $ZIG_SOLANA_DIR/zig build test --global-cache-dir zig-global-cache -j1 --summary all
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
Expand Down
5 changes: 4 additions & 1 deletion program-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ if [[ -z "$ZIG" ]]; then
ZIG="$ROOT_DIR/../zig-x86_64-linux-gnu-baseline/zig"
fi
set -e
$ZIG build --summary all --verbose -j1 --global-cache-dir zig-global-cache
for i in $(seq 1 5)
do
$ZIG build --summary all --verbose && break || sleep 1
done
SBF_OUT_DIR="$ROOT_DIR/zig-out/lib" cargo test --manifest-path "$ROOT_DIR/program-test/Cargo.toml"

0 comments on commit 06adf0c

Please sign in to comment.