-
Notifications
You must be signed in to change notification settings - Fork 63
80 lines (76 loc) · 2.08 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check code format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build with no features
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features
- name: Build with all features
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
- name: Docs
uses: actions-rs/cargo@v1
with:
command: doc
- name: Test with no features
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features
- name: Test with all features
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
examples:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
example:
- aarch64
- riscv
- x86_64
include:
- example: aarch64
packages: qemu-system-arm gcc-aarch64-linux-gnu
- example: riscv
packages: qemu-system-misc
- example: x86_64
packages: qemu-system-x86
steps:
- uses: actions/checkout@v4
- name: Install QEMU
run: sudo apt update && sudo apt install ${{ matrix.packages }} && sudo chmod 666 /dev/vhost-vsock
- name: Check code format
working-directory: examples/${{ matrix.example }}
run: cargo fmt --all -- --check
- name: Build
working-directory: examples/${{ matrix.example }}
run: make kernel
- name: Run
working-directory: examples/${{ matrix.example }}
run: QEMU_ARGS="-display none -audiodev none,id=audio0" make qemu accel="off"