forked from spool-labs/tape
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.71 KB
/
Copy pathci.yml
File metadata and controls
64 lines (51 loc) · 1.71 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
pull_request:
branches: ["main"]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Setup Environment
- name: Install Rust (if missing)
run: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: Cache Solana tools
uses: actions/cache@v4
with:
path: ~/.local/share/solana
key: ${{ runner.os }}-solana-anza-v1
- name: Install Solana tools (cargo-build-sbf)
run: |
if [ ! -f "$HOME/.local/share/solana/install/active_release/bin/cargo-build-sbf" ]; then
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
fi
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Cache cargo registry and build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build
run: cargo build --verbose
- name: Build Tape Solana SBF program
run: cargo build-sbf --manifest-path=program/Cargo.toml --verbose
- name: Build Example Solana SBF program
run: cargo build-sbf --manifest-path=example/Cargo.toml --verbose
- name: Run tests
run: cargo test --verbose
- name: Run clippy
run: cargo clippy --verbose