-
Notifications
You must be signed in to change notification settings - Fork 68
57 lines (48 loc) · 1.24 KB
/
check.yml
File metadata and controls
57 lines (48 loc) · 1.24 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
name: Check
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all --check
clippy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: riscv64
target: riscv64gc-unknown-none-elf
- arch: loongarch64
target: loongarch64-unknown-none-softfloat
- arch: aarch64
target: aarch64-unknown-none-softfloat
- arch: x86_64
target: x86_64-unknown-none
steps:
- uses: actions/checkout@v6
with:
submodules: "recursive"
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
- uses: arceos-org/setup-musl@v1
with:
arch: ${{ matrix.arch }}
- name: Clippy
run: cargo clippy --target ${{ matrix.target }} -F qemu -- -D warnings -A unused