Skip to content

Commit e0d8129

Browse files
no38200190849715ce57fae5b
authored andcommitted
create build.yml
1 parent dc102b1 commit e0d8129

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build_kernel
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: cache dependencies
17+
uses: actions/cache@v3
18+
with:
19+
path: |
20+
/var/cache/apt/archives
21+
~/.cache/pip
22+
key: ${{ runner.os }}-build-deps-${{ hashFiles('install_dependencies.sh') }}
23+
restore-keys: |
24+
${{ runner.os }}-build-deps-
25+
26+
- name: install dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y --no-install-recommends \
30+
build-essential \
31+
gcc-multilib \
32+
nasm \
33+
gdb \
34+
qemu-system-x86 \
35+
clang-format \
36+
mtools \
37+
dosfstools
38+
39+
- name: build kernel
40+
run: make
41+
42+
43+
- name: upload kernel artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: kernel
47+
path: |
48+
_build/kernel.elf
49+
disk/fat16.img
50+
if-no-files-found: error

0 commit comments

Comments
 (0)