Files
subhobhai943andClaude Opus 4.8 65fa4dd049 ci(release): Build and publish all three architectures
Rework the release workflow from a single x86_64 build into a matrix that
builds x86_64 (bootable image), aarch64 and armv8i (bare-metal kernel ELFs)
in parallel, then publishes one prerelease carrying every architecture's
artifacts plus a combined SHA256SUMS.

- x86_64 builds natively (build-essential + nasm + rustc, CROSS_COMPILE=),
  matching the validated local toolchain; aarch64/armv8i use the apt cross
  compilers (gcc-aarch64-linux-gnu, gcc-arm-linux-gnueabihf).
- Artifacts are named SUB-OS-<tag>-<arch>-... and collected by a release job.
- Notes refreshed for the GUI desktop and multi-arch support.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fh5z6V7nGPbHvqVG5p4CXX
2026-08-25 17:02:45 +05:30

170 lines
6.9 KiB
YAML

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 every supported architecture in parallel. x86_64 produces a bootable
# disk image; aarch64 and armv8i produce a bare-metal kernel ELF for QEMU.
# ---------------------------------------------------------------------------
build:
name: Build ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
deps: build-essential nasm rustc
make_args: ARCH=x86_64 CROSS_COMPILE=
- arch: aarch64
deps: build-essential gcc-aarch64-linux-gnu
make_args: ARCH=aarch64
- arch: armv8i
deps: build-essential gcc-arm-linux-gnueabihf
make_args: ARCH=armv8i
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 ${{ matrix.deps }}
- name: Build SUB-OS (${{ matrix.arch }})
run: |
make clean
make ${{ matrix.make_args }}
- name: Prepare Artifacts
run: |
VER="${{ github.event.inputs.tag_name || github.ref_name }}"
mkdir -p dist
if [ "${{ matrix.arch }}" = "x86_64" ]; then
cp SUB-OS.img dist/SUB-OS-${VER}-x86_64.img
cp build/kernel.elf dist/SUB-OS-${VER}-x86_64-kernel.elf
cp build/kernel.bin dist/SUB-OS-${VER}-x86_64-kernel.bin
else
cp build/kernel.elf dist/SUB-OS-${VER}-${{ matrix.arch }}-kernel.elf
fi
ls -lh dist
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: sub-os-${{ matrix.arch }}
path: dist/*
if-no-files-found: error
# ---------------------------------------------------------------------------
# Collect every architecture's artifacts, checksum them, and publish one
# GitHub prerelease carrying all of them.
# ---------------------------------------------------------------------------
release:
name: Publish Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download All Build Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Assemble Release Assets & Checksums
run: |
mkdir -p release-assets
find artifacts -type f -exec cp {} release-assets/ \;
cd release-assets
sha256sum * > SHA256SUMS.txt
echo "=== Release assets ==="
ls -lh
echo "=== SHA256SUMS ==="
cat SHA256SUMS.txt
- name: Determine Release Tag
id: vars
run: echo "tag=${{ github.event.inputs.tag_name || github.ref_name }}" >> "$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/*
body: |
# 🚀 SUB-OS ${{ steps.vars.outputs.tag }}
The first official alpha release of **SUB-OS** — a multi-architecture, modular monolithic operating system kernel written from scratch in C, C++17, Assembly and freestanding bare-metal Rust.
This release ships prebuilt kernels for every supported architecture, now including the new **SUB-OS Graphical Desktop Environment**.
---
### 🖥️ Supported Architectures
| Arch | Artifact | Boot |
|------|----------|------|
| `x86_64` | Bootable raw disk image + kernel ELF/BIN | Two-stage MBR bootloader |
| `aarch64` | Bare-metal kernel ELF | QEMU `-M virt` (Cortex-A57) |
| `armv8i` (AArch32) | Bare-metal kernel ELF | QEMU `-M virt` (Cortex-A15) |
---
### 🌟 Highlights
- 🖥️ **SUB-OS Graphical Desktop Environment**: SUB-WM 800x600 TrueColor double-buffered compositor, the SUB-WT immediate-mode widget toolkit, an icon set, modal dialogs, a real terminal emulator, and desktop apps (File Explorer, System Monitor, Task Manager, Kernel Log, KTest Runner, Text Editor, Calculator, Paint, Clock, Settings). x86_64 boots straight into it; pass `nogui`/`text` for the kernel TTY.
- 🎨 **Boot Logo & Splash**: ASCII mark from the first moments of boot, then a graphical splash with an animated progress bar once the framebuffer is up.
- 🖵 **Framebuffer Console**: VT100-subset console rendered into the framebuffer so the TTY and the **nano** editor work after graphics mode.
- 🧶 **Weave Scheduler**: real per-architecture context switching with behavioural lane weaving and boot-time self-tests.
- 🧵 **Kernel Concurrency Core**: wait queues, futexes, tiny RCU, plus rbtree/kfifo/hashtable data structures and a block page cache.
- 🧪 **In-Kernel Test Harness**: KUnit-style suites (rbtree, kfifo, hashtable, RCU, futex, wait queues, page cache, libcore) runnable from the shell or the desktop KTest Runner.
- 🧰 **LazyBox Userland**: multi-call applet suite plus a separate ring-3 `/sbin/init` ELF.
---
### 🚀 Quick Start
**x86_64 (bootable image):**
```bash
qemu-system-x86_64 -drive format=raw,file=SUB-OS-${{ steps.vars.outputs.tag }}-x86_64.img \
-device VGA,vgamem_mb=32 -serial stdio
```
**aarch64:**
```bash
qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -nographic \
-kernel SUB-OS-${{ steps.vars.outputs.tag }}-aarch64-kernel.elf
```
**armv8i (AArch32):**
```bash
qemu-system-arm -M virt -cpu cortex-a15 -m 128M -nographic \
-kernel SUB-OS-${{ steps.vars.outputs.tag }}-armv8i-kernel.elf
```
---
### 📦 Release Assets
- `SUB-OS-<ver>-x86_64.img` — bootable raw disk image (boots to the GUI desktop).
- `SUB-OS-<ver>-x86_64-kernel.elf` / `.bin` — x86_64 kernel with symbols / flat payload.
- `SUB-OS-<ver>-aarch64-kernel.elf` — AArch64 bare-metal kernel.
- `SUB-OS-<ver>-armv8i-kernel.elf` — AArch32 bare-metal kernel.
- `SHA256SUMS.txt` — SHA-256 checksums for every asset.
> ⚠️ Alpha software — expect rough edges. Run under QEMU; do not boot on hardware you care about.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}