-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (46 loc) · 1.5 KB
/
build.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
env:
cli-id: anchor-v0.29.2-solana-1.17.0
on:
push:
branches:
- 'fix_actions'
jobs:
build-cli-deps:
runs-on: ubicloud-standard-8
steps:
- id: cache-cli-deps
uses: actions/cache@v2
with:
key: $${{ env.cli-id }}
path: |
~/.local/share/solana
- id: install-os-deps
if: steps.cache-cli-deps.outputs.cache-hit != 'true'
run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev
- id: install-solana-tools
if: steps.cache-cli-deps.outputs.cache-hit != 'true'
run: sh -c "$(curl -sSfL https://release.solana.com/v1.17.0/install)"
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: install-anchor
if: steps.cache-cli-deps.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: bridgesplit/anchor
run:
cargo build
mv anchor/target/debug/anchor ./programs/anchor
chmod u+x ./programs/anchor
- run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH" >> $GITHUB_ENV
- uses: actions/setup-node@v2
with:
node-version: '18'
- id: run-tests
run:
cd ./clients/rwa-token-sdk && yarn
cd ./programs && cargo fmt -- --check
cd ./programs && cargo clippy -- -D warnings
cd ./programs && ./anchor build
cd ./programs && ./anchor test