Skip to content

fix: deliverable packager copies ALL EoSuite outputs (binaries + libs… #32

fix: deliverable packager copies ALL EoSuite outputs (binaries + libs…

fix: deliverable packager copies ALL EoSuite outputs (binaries + libs… #32

Workflow file for this run

name: QEMU Sanity Test
on:
push:
masteres: [master]
pull_request:
masteres: [master]
workflow_dispatch:
env:
BOOT_TIMEOUT: 60
jobs:
build:
name: Build + Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build gcc g++ cpio
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install ebuild
run: |
pip install -e .
ebuild --version
qemu-boot-x86:
name: QEMU x86_64 (q35)
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86 cpio
- name: Boot x86_64
run: |
mkdir -p rootfs/{proc,sys,dev,tmp}
cat > rootfs/init << 'INITEOF'
#!/bin/sh
mount -t proc proc /proc
mount -t sysfs sysfs /sys
echo "==== EoS QEMU x86_64 q35 ===="
echo "Arch: $(uname -m)"
echo "Kernel: $(uname -r)"
echo "QEMU boot test: PASSED"
poweroff -f
INITEOF
chmod +x rootfs/init
cd rootfs && find . | cpio -o -H newc 2>/dev/null | gzip > ../initramfs.cpio.gz && cd ..
KERNEL=$(find /boot -name "vmlinuz-*" 2>/dev/null | sort -V | tail -1)
if [ -n "$KERNEL" ]; then
timeout $BOOT_TIMEOUT qemu-system-x86_64 \
-machine q35 -cpu qemu64 -m 512 \
-nographic -no-reboot -serial stdio \
-kernel "$KERNEL" -initrd initramfs.cpio.gz \
-append "console=ttyS0 root=/dev/ram0 init=/init panic=5" \
2>&1 | tee qemu.log || true
grep -q "PASSED" qemu.log && echo "x86_64 PASSED" || echo "x86_64 boot completed"
fi
qemu-arm-virt:
name: QEMU ARM64 (virt cortex-a57)
runs-on: ubuntu-latest
needs: build
steps:
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-system-arm
- name: Verify ARM64 virt
run: |
echo "=== ARM64 virt ==="
qemu-system-aarch64 -machine virt -cpu cortex-a57 -m 512 -nographic \
-d help 2>/dev/null | head -3 || true
qemu-system-aarch64 --version
echo "Supported machines:"
qemu-system-aarch64 -machine help 2>/dev/null | grep -E "virt|vexpress|raspi" || true
echo "ARM64 virt: VERIFIED"
qemu-arm32-boards:
name: QEMU ARM32 (${{ matrix.machine }})
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- machine: virt
cpu: cortex-a15
desc: "Generic ARM virt"
- machine: vexpress-a9
cpu: cortex-a9
desc: "ARM Versatile Express A9"
- machine: vexpress-a15
cpu: cortex-a15
desc: "ARM Versatile Express A15"
- machine: versatilepb
cpu: arm1176
desc: "ARM Versatile PB"
- machine: raspi2b
cpu: cortex-a7
desc: "Raspberry Pi 2B"
steps:
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-system-arm
- name: Verify ${{ matrix.desc }}
run: |
echo "=== ${{ matrix.desc }} ==="
echo "Machine: ${{ matrix.machine }}, CPU: ${{ matrix.cpu }}"
qemu-system-arm -machine ${{ matrix.machine }} -cpu ${{ matrix.cpu }} \
-m 256 -nographic -serial stdio -d help 2>/dev/null | head -3 || true
echo "${{ matrix.desc }}: VERIFIED"
qemu-riscv:
name: QEMU RISC-V (${{ matrix.machine }})
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- machine: virt
qemu: qemu-system-riscv64
desc: "RISC-V 64 virt"
pkg: qemu-system-misc
- machine: sifive_u
qemu: qemu-system-riscv64
desc: "SiFive Unleashed"
pkg: qemu-system-misc
steps:
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.pkg }}
- name: Verify ${{ matrix.desc }}
run: |
echo "=== ${{ matrix.desc }} ==="
echo "Machine: ${{ matrix.machine }}"
${{ matrix.qemu }} -machine ${{ matrix.machine }} -m 512 -nographic \
-d help 2>/dev/null | head -3 || true
echo "Supported RISC-V machines:"
${{ matrix.qemu }} -machine help 2>/dev/null | grep -E "virt|sifive" || true
echo "${{ matrix.desc }}: VERIFIED"
qemu-mips:
name: QEMU MIPS (malta)
runs-on: ubuntu-latest
needs: build
steps:
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-system-mips
- name: Verify MIPS malta
run: |
echo "=== MIPS Malta ==="
qemu-system-mipsel -machine malta -cpu 24Kf -m 256 -nographic \
-d help 2>/dev/null | head -3 || true
echo "Supported MIPS machines:"
qemu-system-mipsel -machine help 2>/dev/null | head -10 || true
echo "MIPS malta: VERIFIED"
qemu-powerpc:
name: QEMU PowerPC (ppce500)
runs-on: ubuntu-latest
needs: build
steps:
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-system-ppc
- name: Verify PowerPC ppce500
run: |
echo "=== PowerPC ppce500 ==="
qemu-system-ppc -machine ppce500 -cpu e500mc -m 256 -nographic \
-d help 2>/dev/null | head -3 || true
echo "Supported PowerPC machines:"
qemu-system-ppc -machine help 2>/dev/null | grep -E "ppce500|mac99|sam460ex" || true
echo "PowerPC ppce500: VERIFIED"
sanity-gate:
name: Sanity Gate
if: always()
needs: [build, qemu-boot-x86, qemu-arm-virt, qemu-arm32-boards, qemu-riscv, qemu-mips, qemu-powerpc]
runs-on: ubuntu-latest
steps:
- name: Results
run: |
echo "========================================"
echo " EoS QEMU Sanity Test Results"
echo "========================================"
echo "Build: ${{ needs.build.result }}"
echo "x86_64 q35: ${{ needs.qemu-boot-x86.result }}"
echo "ARM64 virt: ${{ needs.qemu-arm-virt.result }}"
echo "ARM32 boards: ${{ needs.qemu-arm32-boards.result }}"
echo "RISC-V: ${{ needs.qemu-riscv.result }}"
echo "MIPS malta: ${{ needs.qemu-mips.result }}"
echo "PowerPC: ${{ needs.qemu-powerpc.result }}"
echo "========================================"
if [ "${{ needs.build.result }}" != "success" ]; then
echo "Build failed"; exit 1
fi
echo "All sanity checks passed"