-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (48 loc) · 1.28 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Rust checks
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
format:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-12-11
override: true
components: rustfmt
- name: Run cargo fmt to check formatting
run: cargo fmt --all -- --check
check:
name: Run cargo check on RISC-V targets
runs-on: ubuntu-latest
strategy:
matrix:
target:
- riscv32imac-unknown-none-elf
- riscv64imac-unknown-none-elf
- riscv32imc-unknown-none-elf
- riscv64gc-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-12-11
target: ${{ matrix.target }}
override: true
- name: Install RISC-V target support
run: |
rustup target add ${{ matrix.target }}
- name: Run cargo check for xuantie-riscv
run: |
cd xuantie-riscv
cargo check --target ${{ matrix.target }}