-
Notifications
You must be signed in to change notification settings - Fork 39
87 lines (86 loc) · 2.53 KB
/
rust.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Crust CI
on:
push:
branches:
- master
- mainnet*
- feature/*
paths-ignore:
- '**.md'
pull_request:
branches:
- master
- mainnet*
- feature/*
paths-ignore:
- '**.md'
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache target directory
id: cache-target
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target2-${{ hashFiles('**/Cargo.toml') }}
- run: sudo apt remove clang-6.0 libclang-common-6.0-dev libclang1-6.0 libllvm6.0
- run: sudo apt update && sudo apt install cmake pkg-config libssl-dev git gcc build-essential clang
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-01-19-x86_64-unknown-linux-gnu
target: wasm32-unknown-unknown
override: true
- name: Cargo build
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
- name: Cargo test staking
uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: --package cstrml-staking --lib tests
- name: Cargo test swork
uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: --package cstrml-swork --lib tests
- name: Cargo test market
uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: --package cstrml-market --lib tests
# - name: Cargo test balances
# uses: actions-rs/cargo@v1
# with:
# use-cross: false
# command: test
# args: --package cstrml-balances --lib tests
- name: Cargo test claims
uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: --package cstrml-claims --lib tests
- name: Cargo test swork benchmarking
uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: --package cstrml-swork-benchmarking --lib tests