forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
52 lines (43 loc) · 1.48 KB
/
fmt-and-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
name: Format and Lint
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
fmt-and-lint:
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install toolchain
run: |
rustup toolchain install nightly-2022-10-29 --no-self-update --profile=minimal --component rustfmt clippy
rustup default nightly-2022-10-29
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get -y install libudev-dev
if: matrix.os == 'ubuntu-latest'
- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: fmt check
run: cargo fmt -- --check
- name: x86-64 code lint
run: cargo clippy --all-targets --all-features -- --D warnings
wasm-lint:
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
run: |
rustup toolchain install nightly-2022-10-29 --no-self-update --profile=minimal --component clippy
rustup default nightly-2022-10-29
rustup target add wasm32-unknown-unknown
- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: wasm code lint
run: cargo clippy --target wasm32-unknown-unknown -- --D warnings