forked from os-module/visionfive2-sd
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.25 KB
/
ci.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
name: Check, Build and Test
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain: [nightly]
targets: [riscv64gc-unknown-none-elf]
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-binutils
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, clippy, rustfmt
targets: ${{ matrix.targets }}
- name: Check rust version
run: rustc --version --verbose
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo hack clippy --target ${{ matrix.targets }} --each-feature -- -D warnings
- name: Build
run: cargo hack build --target ${{ matrix.targets }} --each-feature
- name: Clippy on testos
working-directory: example/testos
run: cargo clippy --target ${{ matrix.targets }} -- -D warnings
- name: Build testos
working-directory: example/testos
run: cargo build --target ${{ matrix.targets }}
# FIXME: cp: cannot create regular file '../../../tftpboot/': Not a directory
- name: Run testos
run: cd example && make all