From b69a31008b6fd96a0149104dda9d5e9e960db005 Mon Sep 17 00:00:00 2001 From: mint <36459316+mintsuki@users.noreply.github.com> Date: Mon, 26 Jul 2021 00:34:35 +0200 Subject: [PATCH] ci: add a workflow to test if the Vinix kernel builds (#10963) --- .github/workflows/vinix-kernel.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/vinix-kernel.yml diff --git a/.github/workflows/vinix-kernel.yml b/.github/workflows/vinix-kernel.yml new file mode 100644 index 0000000000..b3a314dd70 --- /dev/null +++ b/.github/workflows/vinix-kernel.yml @@ -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