This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: BasicallyLinux ISO Build Pipeline | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| name: Build Bootable ISO | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install Toolchain & ISO Tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| nasm make cmake wget xorriso grub-pc-bin mtools \ | |
| binutils-i686-linux-gnu gcc-i686-linux-gnu | |
| - name: Build BasicallyLinux Kernel | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -DCMAKE_C_COMPILER=i686-linux-gnu-gcc \ | |
| -DCMAKE_ASM_NASM_COMPILER=nasm \ | |
| -DCMAKE_ASM_NASM_FLAGS="-f elf32" \ | |
| -DCMAKE_C_FLAGS="-m32" \ | |
| -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY | |
| make VERBOSE=1 | |
| - name: Verify Multiboot Header (CRITICAL) | |
| run: | | |
| if grub-file --is-x86-multiboot build/kernel.bin; then | |
| echo "✅ Multiboot header found and valid!" | |
| else | |
| echo "❌ ERROR: No Multiboot header found in kernel.bin" | |
| exit 1 | |
| fi | |
| - name: Prepare ISO Directory | |
| run: | | |
| mkdir -p isodir/boot/grub | |
| cp build/kernel.bin isodir/boot/kernel.bin | |
| # Create a bulletproof grub.cfg | |
| cat << 'EOF' > isodir/boot/grub/grub.cfg | |
| set timeout=5 | |
| set default=0 | |
| menuentry "BasicallyLinux Alpha" { | |
| multiboot /boot/kernel.bin | |
| boot | |
| } | |
| EOF | |
| - name: Generate Bootable ISO | |
| run: | | |
| # grub-mkrescue creates the actual bootable image | |
| grub-mkrescue -o basicallylinux.iso isodir | |
| - name: Archive ISO Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: basicallylinux-bootable-iso | |
| path: basicallylinux.iso |