-
Notifications
You must be signed in to change notification settings - Fork 90
115 lines (84 loc) · 2.49 KB
/
Copy pathcore-rust.yml
File metadata and controls
115 lines (84 loc) · 2.49 KB
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
107
108
109
110
111
112
113
114
115
name: Rust
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
merge_group:
env:
CARGO_TERM_COLOR: always
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust nightly
run: rustup install nightly
- name: Install rustfmt for nightly
run: rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run rustfmt
run: cargo +nightly fmt -- --check
- name: Check `map_err` variable naming
run: make fmt
cargo-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run Clippy
run: |
cargo clippy --all --all-targets --no-deps -- --deny warnings
cargo clippy --package ream-bls --all-targets --features "supranational" --no-deps -- --deny warnings
cargo-sort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
# Install this commit as there isn't a release yet which works for workspace's
- name: Install cargo sort
run: cargo install --git https://github.com/DevinR528/cargo-sort.git --rev 25a60ad860ce7cd0055abf4b69c18285cb07ab41 cargo-sort
- name: Run cargo sort
run: cargo sort --grouped --check --workspace
build:
runs-on: ubuntu-latest
needs: [format, cargo-clippy]
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Build
run: cargo build --verbose
test-devnet5:
name: test devnet5
needs: [format, cargo-clippy]
uses: ./.github/workflows/tests-matrix.yml
with:
network: devnet5
ef-tests:
runs-on: ubuntu-latest
needs: [format, cargo-clippy]
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Test consensus spec tests
run: make test-ef
lean-spec-tests:
runs-on: ubuntu-latest
needs: [format, cargo-clippy]
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Test lean spec tests
run: cd testing/lean-spec-tests && make test