Skip to content

Commit dfc25fd

Browse files
authored
Add workflow for solana-anchor best-practice example (#96)
1 parent dda2834 commit dfc25fd

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Pyth SDK Example Solana Contract with Anchor Library
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: ./examples/sol-anchor-contract
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Install dependencies
21+
run: sudo apt-get update && sudo apt-get install libudev-dev pkg-config build-essential
22+
- name: Install solana binaries
23+
run: |
24+
# Installing 1.14.x cli tools to have sbf instead of bpf. bpf does not work anymore.
25+
sh -c "$(curl -sSfL https://release.solana.com/v1.14.7/install)"
26+
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
27+
- name: Install anchor binaries
28+
run: |
29+
cargo install --git https://github.com/project-serum/anchor avm --locked --force
30+
avm install latest
31+
avm use latest
32+
- name: Build
33+
run: anchor build

0 commit comments

Comments
 (0)