-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (47 loc) · 1.24 KB
/
cargo.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
name: Cargo
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
format:
name: Format check
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: Code check
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: |
cargo check -p xuantie-riscv --target ${{ matrix.target }}