-
Notifications
You must be signed in to change notification settings - Fork 146
106 lines (93 loc) · 2.81 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build and Test Jolt
on:
push:
branches: [main]
pull_request:
branches: ['**', main]
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all
machete:
runs-on: ubuntu-latest
steps:
- uses: bnjbvr/cargo-machete@main
- name: cargo machete
run: cargo machete --with-metadata
build-wasm:
name: Build Wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Build Wasm
working-directory: ./jolt-core
run: cargo build --release --target wasm32-unknown-unknown
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cache Jolt RISC-V Rust toolchain
uses: actions/cache@v4
with:
key: jolt-rust-toolchain-${{hashFiles('guest-toolchain-tag')}}
path: ~/.jolt
- name: Install Jolt RISC-V Rust toolchain
run: cargo run install-toolchain
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run jolt-core tests
run: cargo nextest run --release -p jolt-core
on-chain:
name: Onchain Verifier Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build the rust integration testing scripts
working-directory: ./jolt-evm-verifier
run: cargo build --manifest-path script/Cargo.toml --release
- name: Check build and denny warnings
working-directory: ./jolt-evm-verifier
run: forge build --deny-warnings
- name: Run tests
working-directory: ./jolt-evm-verifier
run: forge test -vvv --via-ir --ffi
- name: Check Format
working-directory: ./jolt-evm-verifier
run: forge fmt --check