forked from rcore-os/rCore-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.28 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: riscv64imac-unknown-none-elf
components: rustfmt, clippy
- name: Check user
run: |
cd user
cargo fmt -- --check
cargo clippy -- -D warnings
- name: Check os
run: |
export USER_IMG="../usr/build/riscv64.img"
cd os
cargo fmt -- --check
cargo clippy -- -D warnings
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: riscv64imac-unknown-none-elf
components: llvm-tools-preview
- name: Install cargo-binutils
run: cargo install cargo-binutils
- name: Install QEMU
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
sudo apt update
sudo apt install qemu-utils
- name: Install QEMU
if: ${{ matrix.os == 'macos-latest' }}
run: brew install qemu
- name: Build user
run: cd user && make build
- name: Build os
run: cd os && make build