-
Notifications
You must be signed in to change notification settings - Fork 40
84 lines (76 loc) · 2.23 KB
/
lint.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
# Runs linting related jobs.
name: lint
on:
push:
branches: [main, next]
pull_request:
types: [opened, reopened, synchronize]
# Limits workflow concurrency to only the latest commit in the PR.
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Rustup
run: |
rustup update --no-self-update nightly
rustup +nightly component add rustfmt
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Fmt
run: make format-check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Rustup
run: |
rustup update --no-self-update
rustup component add clippy
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Clippy
run: make clippy
doc:
name: doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Rustup
run: rustup update --no-self-update
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Build docs
run: make doc
version:
name: rust version consistency
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
profile: minimal
override: true
- name: check rust versions
run: ./scripts/check-rust-version.sh
proto:
name: proto check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Rustup
run: rustup update --no-self-update
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Rebuild protos
run: BUILD_PROTO=1 cargo check -p miden-node-rpc -p miden-rpc-proto
- name: Diff check
run: git diff --exit-code