2021-07-26 00:34:35 +02:00
|
|
|
name: Build Vinix kernel
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2021-07-31 05:33:25 +02:00
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2021-07-26 00:34:35 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-07-31 05:33:25 +02:00
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2021-07-26 00:34:35 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-07-26 07:49:03 +02:00
|
|
|
vinix-build:
|
2021-07-26 00:34:35 +02:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
2022-02-14 19:57:35 +01:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install build-essential meson -y
|
2021-07-26 00:34:35 +02:00
|
|
|
- name: Build V
|
|
|
|
run: make
|
|
|
|
- name: Clone current Vinix
|
2021-10-11 14:41:31 +02:00
|
|
|
run: |
|
2022-02-14 19:57:35 +01:00
|
|
|
git clone https://github.com/vlang/vinix
|
|
|
|
cd vinix && git checkout aa18fc0
|
2021-07-26 00:34:35 +02:00
|
|
|
- name: Clone current mlibc
|
|
|
|
run: git clone https://github.com/managarm/mlibc.git --depth=1
|
|
|
|
- name: Patch mlibc for Vinix
|
2021-09-10 11:19:05 +02:00
|
|
|
run: cd mlibc && patch -p1 < ../vinix/patches/mlibc/0001-Vinix-specific-changes.patch || true
|
2021-07-26 00:34:35 +02:00
|
|
|
- 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)
|
2021-07-26 07:49:03 +02:00
|
|
|
run: cd vinix/kernel && make PROD=false CFLAGS="-D__vinix__ -O2 -g -pipe -I../../mlibc-headers/include" V="../../v" && make clean
|
2021-07-26 00:34:35 +02:00
|
|
|
- name: Attempt to build the Vinix kernel (prod)
|
2021-07-26 07:49:03 +02:00
|
|
|
run: cd vinix/kernel && make PROD=true CFLAGS="-D__vinix__ -O2 -g -pipe -I../../mlibc-headers/include" V="../../v" && make clean
|