Skip to content

Commit 9a8cea6

Browse files
authored
Merge pull request #15 from nova-rey/codex/add-rootfs-ci-harness-workflow
2 parents 89efa5a + fb19455 commit 9a8cea6

3 files changed

Lines changed: 110 additions & 0 deletions

File tree

.github/workflows/rootfs-ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Screaming Penguin Rootfs CI
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 3 * * 0" # Weekly on Sunday at 03:00 UTC
7+
8+
jobs:
9+
rootfs:
10+
name: Build and Validate Debian Rootfs (Bookworm)
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
DEBIAN_FRONTEND: noninteractive
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Show environment info
21+
run: |
22+
uname -a
23+
lsb_release -a || true
24+
echo "Shell: $SHELL"
25+
26+
- name: Install rootfs build dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y \
30+
debootstrap \
31+
xz-utils \
32+
tar
33+
34+
- name: Build Debian rootfs (make rootfs)
35+
run: |
36+
echo "[ROOTFS-CI] Running 'make rootfs' to build Debian Bookworm rootfs…"
37+
make rootfs
38+
echo "[ROOTFS-CI] Listing dist/ contents:"
39+
ls -lh dist || true
40+
41+
- name: Verify rootfs tarball exists
42+
run: |
43+
TARBALL="dist/debian-rootfs-bookworm-amd64.tar.gz"
44+
echo "[ROOTFS-CI] Checking for tarball: $TARBALL"
45+
if [ ! -f "$TARBALL" ]; then
46+
echo "[ROOTFS-CI] ERROR: Rootfs tarball not found."
47+
exit 1
48+
fi
49+
if [ ! -s "$TARBALL" ]; then
50+
echo "[ROOTFS-CI] ERROR: Rootfs tarball is empty."
51+
exit 1
52+
fi
53+
echo "[ROOTFS-CI] Rootfs tarball found and non-empty."
54+
55+
- name: Inspect rootfs tarball contents
56+
run: |
57+
TARBALL="dist/debian-rootfs-bookworm-amd64.tar.gz"
58+
echo "[ROOTFS-CI] Inspecting tarball for key files…"
59+
tar -tzf "$TARBALL" | head -n 40 || true
60+
61+
check_path() {
62+
local path="$1"
63+
if tar -tzf "$TARBALL" | grep -q "^$path"; then
64+
echo "[ROOTFS-CI] OK: Found $path"
65+
else
66+
echo "[ROOTFS-CI] ERROR: Missing required path: $path"
67+
exit 1
68+
fi
69+
}
70+
71+
check_path "etc/os-release"
72+
check_path "bin/sh"
73+
74+
echo "[ROOTFS-CI] Rootfs content checks passed."

docs/CI_OVERVIEW.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,27 @@ The Screaming Penguin CI pipeline provides:
113113
This combination helps prevent regressions in the installer image and catches errors early, while respecting the unique constraints of an installer-focused repository.
114114

115115
---
116+
117+
## Rootfs CI Harness (Phase 4 Optional)
118+
119+
A separate CI workflow validates the Debian rootfs builder:
120+
121+
- **Workflow file:** `.github/workflows/rootfs-ci.yml`
122+
- **Triggers:**
123+
- Manual (`workflow_dispatch`)
124+
- Weekly cron schedule (`0 3 * * 0`)
125+
126+
The rootfs CI job:
127+
128+
1. Installs `debootstrap` and related tools on the CI runner.
129+
2. Runs `make rootfs` to build the Debian Bookworm (amd64) root filesystem.
130+
3. Verifies that the expected tarball exists and is non-empty:
131+
- `dist/debian-rootfs-bookworm-amd64.tar.gz`
132+
4. Inspects the tarball contents and asserts the presence of:
133+
- `etc/os-release`
134+
- `bin/sh`
135+
136+
This workflow does not run on every push or pull request to avoid
137+
overloading Debian mirrors and to keep PR latency low. It is intended
138+
for periodic validation of the rootfs builder and can be triggered
139+
manually when needed.

docs/SP_BIBLE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,15 @@ under build/ and packages it into a versioned tarball under dist/. Safety
6767
constraints are enforced: no host system modification and no real block device
6868
access. Documentation updated to describe the implemented pipeline.
6969

70+
71+
## Entry 008 — Rootfs CI Harness Added
72+
73+
**Date:** 2025-11-16
74+
75+
Added a dedicated GitHub Actions workflow for the Debian rootfs builder.
76+
The `rootfs-ci` workflow can be triggered manually or on a weekly schedule.
77+
It installs debootstrap, runs `make rootfs` to produce
78+
`dist/debian-rootfs-bookworm-amd64.tar.gz`, and verifies that the tarball
79+
exists, is non-empty, and contains key files such as etc/os-release and bin/sh.
80+
This CI job does not run on every push or pull request and is intended as a
81+
periodic validation of the rootfs bakery.

0 commit comments

Comments
 (0)