-
Notifications
You must be signed in to change notification settings - Fork 7
68 lines (66 loc) · 2.12 KB
/
test.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
63
64
65
66
67
68
name: Rust CI - Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Test:
runs-on: soon-runtime-spot
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
if: always() && ((github.event_name == 'pull_request' && (github.base_ref == 'main' || github.base_ref == 'dev')) || (github.event_name == 'push' && (format('refs/heads/{0}', 'main') == github.ref || format('refs/heads/{0}', 'dev') == github.ref)))
steps:
- name: Check Env
run: |
printenv
- name: Checkout code
uses: actions/checkout@v3
- name: Check
run: |
ls
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Packages
uses: ConorMacBride/install-package@v1
with:
apt: >-
pkg-config
build-essential
libssl-dev
clang
libclang-dev
- name: Install solana tools
run: |
curl -L https://github.com/solana-labs/solana/releases/download/v1.18.18/solana-release-x86_64-unknown-linux-gnu.tar.bz2 -O
tar -xvjf solana-release-x86_64-unknown-linux-gnu.tar.bz2 -C ./
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.SOON_GITHUB_TOKEN }}
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Run tests
run: |-
export PATH="./solana-release/bin:$PATH"
which solana-keygen
make test
working-directory: "./"