ci: Add GitHub Actions workflows for CI verification and automated v0.0.1-alpha release

This commit is contained in:
subhobhai943 committed 2026-08-16 21:31:07 +05:30
1 parent 8c1104eedf
commit 9723e079b9
2 files changed
+147

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
name: CI Build & Kernel Verification
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build & Verify SUB-OS
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y nasm gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu make qemu-system-x86
- name: Compile SUB-OS Kernel & Bootloader
run: |
make clean
make CROSS_COMPILE=x86_64-linux-gnu-
- name: Verify Image Generation
run: |
test -f SUB-OS.img
test -f build/kernel.elf
test -f build/kernel.bin
ls -lh SUB-OS.img build/kernel.elf build/kernel.bin
+114
View File
@@ -0,0 +1,114 @@
name: Release SUB-OS
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag_name:
description: 'Release Tag (e.g. v0.0.1-alpha)'
required: true
default: 'v0.0.1-alpha'
permissions:
contents: write
jobs:
build-and-release:
name: Build & Publish Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Toolchain Dependencies
run: |
sudo apt-get update
sudo apt-get install -y nasm gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu make qemu-system-x86
- name: Build SUB-OS Kernel & Bootable Disk Image
run: |
make clean
make CROSS_COMPILE=x86_64-linux-gnu-
- name: Verify Image and Prepare Release Artifacts
run: |
mkdir -p release-assets
cp SUB-OS.img release-assets/
cp build/kernel.elf release-assets/
cp build/kernel.bin release-assets/
cd release-assets
sha256sum SUB-OS.img kernel.elf kernel.bin > SHA256SUMS.txt
cat SHA256SUMS.txt
cd ..
- name: Determine Release Tag
id: vars
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ github.event.inputs.tag_name }}"
else
TAG="${GITHUB_REF#refs/tags/}"
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.vars.outputs.tag }}
name: "SUB-OS ${{ steps.vars.outputs.tag }}"
draft: false
prerelease: true
files: |
release-assets/SUB-OS.img
release-assets/kernel.elf
release-assets/kernel.bin
release-assets/SHA256SUMS.txt
body: |
# 🚀 SUB-OS ${{ steps.vars.outputs.tag }}
Welcome to the first official alpha release of **SUB-OS**!
**SUB-OS** is a 64-bit modular monolithic operating system built from scratch for the `x86_64` architecture, featuring modern Unix-like kernel architecture and the **LazyBox** multi-call userland binary suite.
---
### 🌟 Included Subsystems & Features
- 🖥️ **64-Bit Bare-Metal Core**: Custom two-stage MBR bootloader with BIOS E820 memory mapping and 4GB 4-level PML4 identity paging.
- ⚡ **Preemptive Scheduler**: 8254 PIT (100 Hz, 10ms resolution) driving Round-Robin task multitasking with atomic spinlocks & semaphores.
- 🧠 **Memory Management**: 64-bit Physical Page Frame Allocator (4 KB bitmap) & Dynamic Kernel Heap (4 MB pool) with boundary tag coalescing.
- 📁 **Virtual File System (VFS)**: POSIX-like VFS layer (`vfs_namei`), in-memory root RAMFS, synthetic `/dev` devfs, and `/proc` metrics procfs.
- 🖧 **Hardware Drivers**:
- **Char**: VGA Text mode, Virtual Terminals TTY1-4 with ANSI escape support, 16550 UART Serial (COM1), PS/2 Keyboard with scancode translation.
- **Block**: ATA / IDE Hard Disk PIO driver (28-bit LBA).
- **PCI**: Bus enumeration and BAR address space mapping.
- **Network**: Intel 82540EM Gigabit Ethernet NIC with circular DMA RX/TX rings.
- **Audio**: PC Speaker tone generator via PIT Channel 2.
- 🌐 **Network Protocol Stack**: Ethernet L2, dynamic ARP table cache, IPv4 routing & checksums, and ICMP Echo client/server (`ping`).
- 🔒 **Kernel Cryptography**: FIPS 180-4 SHA-256, RFC 1321 MD5, IEEE 802.3 CRC32, and Xorshift128+ CSPRNG.
- 🧰 **LazyBox Multi-Call Userland**: 42 applets (`ls`, `cat`, `touch`, `mkdir`, `wc`, `ping`, `ifconfig`, `arp`, `sha256sum`, `md5sum`, `crc32`, `hdparm`, `uname`, `free`, `uptime`, `dmesg`, `sleep`, `clear`, `neofetch`, `echo`, `calc`) with command history and inline cursor editing.
---
### 🚀 Quick Start (Running with QEMU)
Download `SUB-OS.img` attached below and launch using QEMU:
```bash
qemu-system-x86_64 -drive format=raw,file=SUB-OS.img -nic model=e1000 -serial stdio
```
---
### 📦 Release Assets
- `SUB-OS.img`: 1.5 MB bootable raw floppy/disk image.
- `kernel.elf`: 64-bit Kernel ELF binary with symbol tables for debugging.
- `kernel.bin`: Flat kernel binary payload loaded by stage 2 bootloader.
- `SHA256SUMS.txt`: Cryptographic SHA-256 validation checksums.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}