-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (34 loc) · 1.11 KB
/
_check.yml
File metadata and controls
44 lines (34 loc) · 1.11 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
name: _Check
on:
workflow_call:
jobs:
lint:
name: Clippy & Shear
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: compiler
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install cargo-shear
run: cargo install cargo-shear
working-directory: compiler
# Detects declared but unused dependencies.
- name: Shear (unused deps)
run: cargo shear
working-directory: compiler
# Lint for native targets (windows, linux, macos).
- name: Clippy (native)
run: cargo clippy --all-targets -- -D warnings
working-directory: compiler
# Lint for wasm target.
- name: Install wasm target
run: rustup target add wasm32-unknown-unknown
working-directory: compiler
- name: Clippy (wasm)
run: cargo clippy --lib --target wasm32-unknown-unknown --features wasm -- -D warnings
working-directory: compiler