1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: add a workflow to test if the Vinix kernel builds (#10963)

This commit is contained in:
mint 2021-07-26 00:34:35 +02:00 committed by GitHub
parent 8e47d27cb9
commit b69a31008b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

29
.github/workflows/vinix-kernel.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Build Vinix kernel
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install build-essential meson -y
- name: Build V
run: make
- name: Clone current Vinix
run: git clone https://github.com/vlang/vinix.git --depth=1
- name: Clone current mlibc
run: git clone https://github.com/managarm/mlibc.git --depth=1
- name: Patch mlibc for Vinix
run: cd mlibc && patch -p3 < ../vinix/patches/mlibc/mlibc.patch
- name: Install mlibc headers
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
- name: Attempt to build the Vinix kernel (debug)
run: cd vinix/kernel && make PROD=false CFLAGS="-O2 -g -pipe -I../mlibc-headers" V="../../v" && make clean
- name: Attempt to build the Vinix kernel (prod)
run: cd vinix/kernel && make PROD=true CFLAGS="-O2 -g -pipe -I../mlibc-headers" V="../../v" && make clean