Skip to content

fix some nonsense

fix some nonsense #155

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-x86_32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install ansifilter nasm gcc-multilib g++-multilib xorriso grub-common mtools qemu-system-x86 llvm-dev libclang-dev clang python3 pkg-config flex bison xxd
- name: compile
run: |
cd $GITHUB_WORKSPACE
make alldefconfig MAKE_ARCH=x86
make tests MAKE_ARCH=x86
make MAKE_ARCH=x86 CFLAGS="-m32 -march=i386" LDFLAGS="-m elf_i386" CXXFLAGS="-m32 -march=i386" LDFLAGS="-m elf_i386"
make bootimg-x86-32 MAKE_ARCH=x86
- name: run
run: |
cd $GITHUB_WORKSPACE
timeout 30 qemu-system-x86_64 -cdrom vix.iso -nographic | ansifilter | tee log.txt || true
- name: upload files
uses: actions/upload-artifact@v3
with:
name: ci-run-x86_32
path: ${{runner.workspace}}/vix/vix.iso
- name: check tests
run: |
cd $GITHUB_WORKSPACE
nm --format=bsd -n kernel/kernel.o | python3 tools/testparser.py log.txt >> $GITHUB_STEP_SUMMARY
nm --format=bsd -n kernel/kernel.o | python3 tools/testparser.py log.txt -f
build-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install ansifilter qemu-system-x86 ovmf seabios llvm-dev libclang-dev clang python3 pkg-config flex bison git nasm gzip gawk mtools xxd
- name: build limine
run: |
cd $GITHUB_WORKSPACE/../
wget https://github.com/limine-bootloader/limine/releases/download/v7.4.0/limine-7.4.0.tar.gz
tar -xf limine-7.4.0.tar.gz && mv limine-7.4.0/ limine/
cd limine
./bootstrap
./configure --enable-uefi-x86-64 --enable-bios
make -j $(nproc)
sudo make install
- name: compile
run: |
cd $GITHUB_WORKSPACE
make alldefconfig MAKE_ARCH=x86
make tests MAKE_ARCH=x86
sed -i 's/CONFIG_ENABLE_KERNEL_32=y/# CONFIG_ENABLE_KERNEL_32=y\nCONFIG_ENABLE_KERNEL_64=y/g' kernel/.config
make MAKE_ARCH=x86
make bootimg-x86-64 MAKE_ARCH=x86
- name: run
run: |
cd $GITHUB_WORKSPACE
timeout 30 qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -nographic -serial mon:stdio -hda vix_uefi.img | ansifilter | tee log.txt || true
- name: upload files
uses: actions/upload-artifact@v3
with:
name: ci-run-x86_64
path: ${{runner.workspace}}/vix/vix_uefi.img
- name: check tests
run: |
cd $GITHUB_WORKSPACE
nm --format=bsd -n kernel/kernel.o | python3 tools/testparser.py log.txt >> $GITHUB_STEP_SUMMARY
nm --format=bsd -n kernel/kernel.o | python3 tools/testparser.py log.txt -f
build-aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install ansifilter qemu-system-arm qemu-efi-aarch64 seabios llvm-dev libclang-dev clang python3 pkg-config flex bison gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu git nasm gzip gawk mtools xxd
- name: build limine
run: |
cd $GITHUB_WORKSPACE/../
wget https://github.com/limine-bootloader/limine/releases/download/v7.4.0/limine-7.4.0.tar.gz
tar -xf limine-7.4.0.tar.gz && mv limine-7.4.0/ limine/
cd limine
./bootstrap
CROSS_TOOLCHAIN=aarch64-linux-gnu ./configure --enable-uefi-aarch64
make -j $(nproc)
sudo make install
- name: compile
run: |
cd $GITHUB_WORKSPACE
make alldefconfig tests all MAKE_ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu-
make bootimg-aarch64
- name: run
run: |
cd $GITHUB_WORKSPACE
timeout 30 qemu-system-aarch64 -m 1024m -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -cpu cortex-a53 -smp 4 -machine virt -device ramfb -device qemu-xhci -device usb-kbd -nographic -serial mon:stdio -hda vix_uefi.img | ansifilter | tee log.txt || true
- name: upload files
uses: actions/upload-artifact@v3
with:
name: ci-run-aarch64
path: ${{runner.workspace}}/vix/vix_uefi.img
- name: check tests
run: |
cd $GITHUB_WORKSPACE
aarch64-linux-gnu-nm --format=bsd -n kernel/kernel.o | python3 tools/testparser.py log.txt >> $GITHUB_STEP_SUMMARY
aarch64-linux-gnu-nm --format=bsd -n kernel/kernel.o | python3 tools/testparser.py log.txt -f
formatting_and_spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y codespell python3
- name: count LOC
run: |
cd $GITHUB_WORKSPACE
python3 tools/locchart.py >> $GITHUB_STEP_SUMMARY
- name: codespell
run: cd $GITHUB_WORKSPACE && codespell -q 3 --builtin clear -S ./.git,./kernel/scripts -L useable || true >> $GITHUB_STEP_SUMMARY
- name: clang-format
run: cd $GITHUB_WORKSPACE && python3 tools/clang_check.py >> $GITHUB_STEP_SUMMARY