Skip to content

Commit 9d840bf

Browse files
committed
create build.yml
1 parent dc102b1 commit 9d840bf

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-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

libc/string.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22
#include "bits.h"
33

4+
#include <stdarg.h>
5+
46
void int_to_ascii(int n, char str[]);
57
void reverse(char s[]);
68
int strlen(const char s[]);

0 commit comments

Comments
 (0)