-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (47 loc) · 1.34 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
name: Build, test and lint
on:
push:
branches: ["**"]
workflow_dispatch:
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: Free up space on runner
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install protoc
run: |
sudo apt-get install -y protobuf-compiler
protoc --version
- uses: actions/checkout@v3
- name: Rust Setup
uses: dtolnay/rust-toolchain@master
with:
targets: wasm32-unknown-unknown
toolchain: nightly-2023-05-22
- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
- name: Rust Cache
uses: Swatinem/[email protected]
with:
cache-on-failure: true
cache-all-crates: true
- name: Check Build
run: |
cargo check --release
- name: Run tests
run: cargo test --release --locked --verbose --all
- name: Check try-runtime build
run: cargo check --release --features=try-runtime
- name: Ensure benchmarking compiles
run: >
pushd node &&
cargo check --release --features=runtime-benchmarks