-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (60 loc) · 1.71 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
52
53
54
55
56
57
58
59
60
61
62
name: Build
on:
push:
branches:
- master
- main
paths:
- "**.rs"
- "**.toml"
- "**.lock"
- ".github/workflows/*.yml"
pull_request:
branches:
- master
- main
paths:
- "**.rs"
- "**.toml"
- "**.lock"
- ".github/workflows/*.yml"
jobs:
format-build-test:
runs-on: ubicloud
steps:
- name: Check out
uses: actions/checkout@v2
- name: Config rust toolchain
run: |
rustup show active-toolchain
rustup component add clippy rustfmt
- name: install libdrift_ffi_sys
run: |
curl -L https://github.com/user-attachments/files/17126152/libdrift_ffi_sys.so.zip > ffi.zip
unzip ffi.zip
ldd libdrift_ffi_sys.so
sudo cp libdrift_ffi_sys.so /usr/lib
ldconfig -p
- name: Format
run: cargo fmt --all -- --check
- name: Build
run: cargo check
env:
CARGO_DRIFT_FFI_PATH: "/usr/lib"
# - name: Clippy
# uses: giraffate/clippy-action@v1
# with:
# reporter: 'github-pr-review'
# github_token: ${{ secrets.GITHUB_TOKEN }}
# env:
# RUST_TOOLCHAIN: stable-x86_64-linux-unknown-gnu # force clippy to build with same rust version
# CARGO_DRIFT_FFI_PATH: "/usr/lib"
- name: Test
run: |
cargo test --no-fail-fast --lib -- --nocapture
cargo test --no-fail-fast --test integration -- --nocapture --test-threads 1
env:
RUST_LOG: info
TEST_DEVNET_RPC_ENDPOINT: ${{ secrets.DEVNET_RPC_ENDPOINT }}
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
CARGO_DRIFT_FFI_PATH: "/usr/lib"