-
-
Notifications
You must be signed in to change notification settings - Fork 142
99 lines (71 loc) · 2.04 KB
/
makefile.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Build Check
on:
push:
branches: [ "master", "feat-*", "fix-*"]
pull_request:
branches: [ "master", "feat-*", "fix-*"]
jobs:
# ensure the toolchain is cached
ensure-toolchain:
uses: ./.github/workflows/cache-toolchain.yml
format-check:
name: Format check ${{ matrix.arch }}
runs-on: ubuntu-latest
needs: [ensure-toolchain]
continue-on-error: true
strategy:
matrix:
arch: [x86_64, riscv64]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/import-toolchain
- name: Format check
env:
ARCH: ${{ matrix.arch }}
run: |
printf "\n" >> kernel/src/include/bindings/bindings.rs
FMT_CHECK=1 make fmt
kernel-static-test:
name: Kernel static test ${{ matrix.arch }}
runs-on: ubuntu-latest
needs: [ensure-toolchain]
continue-on-error: true
strategy:
matrix:
arch: [x86_64, riscv64]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/import-toolchain
- name: Run kernel static test
shell: bash -ileo pipefail {0}
env:
ARCH: ${{ matrix.arch }}
run: bash -c "source ~/.cargo/env && cd kernel && make test"
build-x86_64:
runs-on: ubuntu-latest
needs: [ensure-toolchain]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/import-toolchain
- name: build the DragonOS
env:
ARCH: x86_64
shell: bash -ileo pipefail {0}
run: |
source ~/.bashrc
source ~/.cargo/env
export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
make -j $(nproc)
build-riscv64:
runs-on: ubuntu-latest
needs: [ensure-toolchain]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: ./.github/actions/import-toolchain
- name: build the DragonOS
shell: bash -ileo pipefail {0}
env:
ARCH: riscv64
run: source ~/.bashrc && source ~/.cargo/env && make kernel -j $(nproc)