-
Notifications
You must be signed in to change notification settings - Fork 18
35 lines (32 loc) · 1.13 KB
/
rust.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Install Targets
run: rustup target add x86_64-unknown-none aarch64-unknown-none riscv64gc-unknown-none-elf loongarch64-unknown-none
- name: Rust Version
run: rustup --version && rustc --version
- name: Run clippy x86_64
run: cargo clippy --verbose --target x86_64-unknown-none --all-features -- -D warnings
- name: Run clippy aarch64
run: cargo clippy --verbose --target aarch64-unknown-none --all-features -- -D warnings
- name: Run clippy riscv64
run: cargo clippy --verbose --target riscv64gc-unknown-none-elf --all-features -- -D warnings
- name: Run clippy loongarch64
run: cargo clippy --verbose --target loongarch64-unknown-none --all-features -- -D warnings
- name: Reformat code
uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}