Skip to content

Commit b69a310

Browse files
authored
ci: add a workflow to test if the Vinix kernel builds (#10963)
1 parent 8e47d27 commit b69a310

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/vinix-kernel.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Vinix kernel
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install dependencies
15+
run: sudo apt-get update && sudo apt-get install build-essential meson -y
16+
- name: Build V
17+
run: make
18+
- name: Clone current Vinix
19+
run: git clone https://github.com/vlang/vinix.git --depth=1
20+
- name: Clone current mlibc
21+
run: git clone https://github.com/managarm/mlibc.git --depth=1
22+
- name: Patch mlibc for Vinix
23+
run: cd mlibc && patch -p3 < ../vinix/patches/mlibc/mlibc.patch
24+
- name: Install mlibc headers
25+
run: mkdir mlibc-build && cd mlibc-build && meson --cross-file ../vinix/cross_file.txt --prefix=/ -Dheaders_only=true ../mlibc && ninja && mkdir ../mlibc-headers && DESTDIR=`realpath ../mlibc-headers` ninja install
26+
- name: Attempt to build the Vinix kernel (debug)
27+
run: cd vinix/kernel && make PROD=false CFLAGS="-O2 -g -pipe -I../mlibc-headers" V="../../v" && make clean
28+
- name: Attempt to build the Vinix kernel (prod)
29+
run: cd vinix/kernel && make PROD=true CFLAGS="-O2 -g -pipe -I../mlibc-headers" V="../../v" && make clean

0 commit comments

Comments
 (0)