-
Notifications
You must be signed in to change notification settings - Fork 7
152 lines (140 loc) · 4.51 KB
/
lint.yaml
File metadata and controls
152 lines (140 loc) · 4.51 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: lint
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@clippy
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run clippy
run: cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
env:
RUSTFLAGS: -D warnings
fmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run fmt
run: cargo fmt --all --check
check-toml:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: Run dprint
uses: dprint/check@v2.3
with:
config-path: dprint.json
udeps:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@cargo-udeps
- name: Run udeps
run: cargo udeps --workspace --lib --examples --tests --benches --all-features --locked
zepter:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: cargo-bins/cargo-binstall@main
- name: fetch deps
run: |
# Eagerly pull dependencies
cargo metadata --format-version=1 --locked > /dev/null
- name: run zepter
run: |
cargo binstall zepter --force -y --locked
zepter run check
docs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run doc
run: cargo docs --document-private-items --exclude rollup-node-chain-orchestrator
env:
RUSTDOCFLAGS: --cfg docsrs --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options -D warnings
codespell:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: codespell-project/actions-codespell@v2
with:
skip: "*.json"
features:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run feature check
run: cargo hack check --feature-powerset
no_std:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
include:
- type: wasm
target: wasm32-unknown-unknown
exclude: |
scroll-engine,scroll-wire,rollup-node,scroll-network,rollup-node-manager,rollup-node-watcher,scroll-db,scroll-migration,rollup-node-chain-orchestrator,scroll-codec,scroll-derivation-pipeline,rollup-node-providers,rollup-node-sequencer,rollup-node-signer,scroll-l1,tests,rollup-node-primitives
- type: riscv
target: riscv32imac-unknown-none-elf
exclude: |
scroll-engine,scroll-wire,rollup-node,scroll-network,rollup-node-manager,rollup-node-watcher,scroll-db,scroll-migration,rollup-node-chain-orchestrator,scroll-codec,scroll-derivation-pipeline,rollup-node-providers,rollup-node-sequencer,rollup-node-signer,scroll-l1,tests,rollup-node-primitives
steps:
- uses: actions/checkout@v5
- uses: rui314/setup-mold@v1
- uses: dcarbone/install-jq-action@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run no_std check
run: |
sudo apt update && sudo apt install gcc-multilib
.github/assets/check_no_std.sh
env:
TARGET: ${{ matrix.target }}
EXCLUDE: ${{ matrix.exclude }}