-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.34 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build compiler for linux and mac
on: [pull_request, push]
env:
ZIG_SOLANA_VERSION: v1.39
ZIG_SOLANA_DIR: zig-x86_64-linux-gnu-baseline
RUST_STABLE: 1.76.0
jobs:
program:
name: Build and test helloworld
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
$ZIG_SOLANA_DIR
key: zig-solana-${{ hashFiles('./program-test/Cargo.lock') }}-$ZIG_SOLANA_VERSION
- name: Download solana-zig compiler
shell: bash
env:
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
run: |
curl --proto '=https' --tlsv1.2 -sSfOL $ZIG_SOLANA_RELEASE_URL/$ZIG_SOLANA_TAR
tar -xjf $ZIG_SOLANA_TAR
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: $RUST_STABLE
- name: Install build deps
shell: bash
run: |
sudo apt update
sudo apt install libudev-dev binutils-dev libunwind-dev protobuf-compiler -y
- name: Build and test program
shell: bash
env:
ZIG_SOLANA: $ZIG_SOLANA_DIR/zig
run: ./program-test/test.sh $ZIG_SOLANA