Skip to content

Commit 9218da9

Browse files
author
Robot Philosopher
committed
Trigger caboose-platforms.yml CI run
1 parent c2d3eaa commit 9218da9

1 file changed

Lines changed: 279 additions & 0 deletions

File tree

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
name: caboose-platforms
2+
3+
# Test caboose.com (Mexican Toaster state machine + overlay filesystem)
4+
# across all 6 CI platforms: Linux/macOS/Windows on x86_64 and aarch64.
5+
#
6+
# Caboose is the more complex binary — it embeds mtsh, lsdir, fasterzip,
7+
# and zipcopy in its /zip/ filesystem. Tests cover: help, check, status,
8+
# ls (ZIP listing), thaw/discard lifecycle, and embedded binary execution.
9+
#
10+
# Usage:
11+
# 1. Build and package: bash third_party/mexican_toaster/caboose/package_caboose_fat.sh
12+
# 2. Trigger: ./trigger_caboose_test.sh
13+
14+
on:
15+
push:
16+
branches:
17+
- master
18+
- "feature/ruby-*"
19+
paths:
20+
- '.github/workflows/caboose-platforms.yml'
21+
workflow_dispatch:
22+
inputs:
23+
release_tag:
24+
description: 'Release tag containing caboose.com'
25+
required: true
26+
default: 'caboose-test'
27+
28+
permissions:
29+
contents: read
30+
31+
env:
32+
RELEASE_TAG: ${{ inputs.release_tag || 'caboose-test' }}
33+
REPO: ${{ github.repository }}
34+
35+
jobs:
36+
test:
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- { os: ubuntu-latest, arch: x86_64, name: linux-x86, shell: bash }
42+
- { os: ubuntu-24.04-arm, arch: aarch64, name: linux-arm64, shell: bash }
43+
- { os: macos-15-intel, arch: x86_64, name: macos-x86, shell: bash }
44+
- { os: macos-latest, arch: aarch64, name: macos-arm64, shell: bash }
45+
- { os: windows-latest, arch: x86_64, name: windows-x86, shell: pwsh }
46+
- { os: windows-11-arm, arch: aarch64, name: windows-arm64, shell: pwsh }
47+
48+
runs-on: ${{ matrix.os }}
49+
name: test-${{ matrix.name }}
50+
continue-on-error: true
51+
defaults:
52+
run:
53+
shell: ${{ matrix.shell }}
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
if: runner.os == 'Linux'
58+
with:
59+
sparse-checkout: |
60+
build/bootstrap
61+
sparse-checkout-cone-mode: false
62+
63+
- name: download caboose.com (unix)
64+
if: runner.os != 'Windows'
65+
run: |
66+
gh release download "$RELEASE_TAG" --repo "$REPO" --pattern 'caboose.com' --dir .
67+
chmod +x caboose.com
68+
env:
69+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
71+
- name: download caboose.com (windows)
72+
if: runner.os == 'Windows'
73+
run: |
74+
gh release download "$env:RELEASE_TAG" --repo "$env:REPO" --pattern 'caboose.com' --dir .
75+
env:
76+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
78+
- name: setup ape loader (linux)
79+
if: runner.os == 'Linux'
80+
run: |
81+
if [ "${{ matrix.arch }}" = "aarch64" ]; then
82+
sudo cp -a build/bootstrap/ape.aarch64 /usr/bin/ape
83+
else
84+
sudo cp -a build/bootstrap/ape.elf /usr/bin/ape
85+
fi
86+
sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
87+
88+
# ── Basic CLI tests ──────────────────────────────────────────
89+
90+
- name: test help (unix)
91+
if: runner.os != 'Windows'
92+
run: |
93+
OUTPUT=$(./caboose.com help 2>&1)
94+
echo "$OUTPUT"
95+
if echo "$OUTPUT" | grep -qi "usage\|caboose"; then
96+
echo "PASS: help works on ${{ matrix.name }}"
97+
else
98+
echo "FAIL: help output unexpected on ${{ matrix.name }}"
99+
exit 1
100+
fi
101+
102+
- name: test help (windows)
103+
if: runner.os == 'Windows'
104+
run: |
105+
$output = & .\caboose.com help 2>&1
106+
Write-Host ($output -join "`n")
107+
if ($output -match "usage|caboose") {
108+
Write-Host "PASS: help works on ${{ matrix.name }}"
109+
} else {
110+
Write-Host "FAIL: help output unexpected on ${{ matrix.name }}"
111+
exit 1
112+
}
113+
114+
- name: test check (unix)
115+
if: runner.os != 'Windows'
116+
run: |
117+
OUTPUT=$(./caboose.com check 2>&1)
118+
echo "$OUTPUT"
119+
if echo "$OUTPUT" | grep -q "healthy"; then
120+
echo "PASS: check works on ${{ matrix.name }}"
121+
else
122+
echo "WARNING: check status unclear on ${{ matrix.name }}"
123+
fi
124+
125+
- name: test check (windows)
126+
if: runner.os == 'Windows'
127+
run: |
128+
$output = & .\caboose.com check 2>&1
129+
Write-Host ($output -join "`n")
130+
if ($output -match "healthy") {
131+
Write-Host "PASS: check works on ${{ matrix.name }}"
132+
} else {
133+
Write-Host "WARNING: check status unclear on ${{ matrix.name }}"
134+
}
135+
136+
- name: test status (unix)
137+
if: runner.os != 'Windows'
138+
run: |
139+
OUTPUT=$(./caboose.com status 2>&1)
140+
echo "$OUTPUT"
141+
if echo "$OUTPUT" | grep -qi "cold\|state"; then
142+
echo "PASS: status works on ${{ matrix.name }}"
143+
else
144+
echo "WARNING: status output unexpected on ${{ matrix.name }}"
145+
fi
146+
147+
- name: test status (windows)
148+
if: runner.os == 'Windows'
149+
run: |
150+
$output = & .\caboose.com status 2>&1
151+
Write-Host ($output -join "`n")
152+
if ($output -match "cold|state") {
153+
Write-Host "PASS: status works on ${{ matrix.name }}"
154+
} else {
155+
Write-Host "WARNING: status output unexpected on ${{ matrix.name }}"
156+
}
157+
158+
# ── ZIP filesystem tests ─────────────────────────────────────
159+
160+
- name: test ls (unix)
161+
if: runner.os != 'Windows'
162+
run: |
163+
OUTPUT=$(./caboose.com ls 2>&1)
164+
echo "$OUTPUT"
165+
COUNT=$(echo "$OUTPUT" | wc -l)
166+
if [ "$COUNT" -gt 0 ]; then
167+
echo "PASS: ls shows $COUNT entries on ${{ matrix.name }}"
168+
else
169+
echo "FAIL: ls produced no output on ${{ matrix.name }}"
170+
exit 1
171+
fi
172+
173+
- name: test ls (windows)
174+
if: runner.os == 'Windows'
175+
run: |
176+
$output = & .\caboose.com ls 2>&1
177+
Write-Host ($output -join "`n")
178+
$count = ($output | Measure-Object -Line).Lines
179+
if ($count -gt 0) {
180+
Write-Host "PASS: ls shows $count entries on ${{ matrix.name }}"
181+
} else {
182+
Write-Host "FAIL: ls produced no output on ${{ matrix.name }}"
183+
exit 1
184+
}
185+
186+
- name: test cat (unix)
187+
if: runner.os != 'Windows'
188+
run: |
189+
OUTPUT=$(./caboose.com cat README.txt 2>&1) || true
190+
echo "$OUTPUT"
191+
if echo "$OUTPUT" | grep -qi "toaster\|caboose"; then
192+
echo "PASS: cat README.txt works on ${{ matrix.name }}"
193+
else
194+
echo "WARNING: cat output unexpected on ${{ matrix.name }}"
195+
fi
196+
197+
- name: test cat (windows)
198+
if: runner.os == 'Windows'
199+
run: |
200+
$output = & .\caboose.com cat README.txt 2>&1
201+
Write-Host ($output -join "`n")
202+
if ($output -match "toaster|caboose") {
203+
Write-Host "PASS: cat README.txt works on ${{ matrix.name }}"
204+
} else {
205+
Write-Host "WARNING: cat output unexpected on ${{ matrix.name }}"
206+
}
207+
208+
# ── Thaw/discard lifecycle (Linux only — needs namespaces) ───
209+
210+
- name: test thaw/discard lifecycle
211+
if: runner.os == 'Linux'
212+
run: |
213+
WORKDIR=$(mktemp -d /tmp/caboose-ci-XXXXXX)
214+
cp caboose.com "$WORKDIR/caboose.com"
215+
chmod +x "$WORKDIR/caboose.com"
216+
217+
echo "--- thaw ---"
218+
"$WORKDIR/caboose.com" thaw 2>&1 || true
219+
220+
echo "--- status after thaw ---"
221+
STATUS=$("$WORKDIR/caboose.com" status 2>&1)
222+
echo "$STATUS"
223+
if echo "$STATUS" | grep -qi "thawed"; then
224+
echo "PASS: thaw works on ${{ matrix.name }}"
225+
else
226+
echo "WARNING: thaw may not have succeeded on ${{ matrix.name }}"
227+
fi
228+
229+
echo "--- discard ---"
230+
"$WORKDIR/caboose.com" discard 2>&1 || true
231+
232+
echo "--- status after discard ---"
233+
STATUS=$("$WORKDIR/caboose.com" status 2>&1)
234+
echo "$STATUS"
235+
if echo "$STATUS" | grep -qi "cold"; then
236+
echo "PASS: discard works on ${{ matrix.name }}"
237+
else
238+
echo "WARNING: discard may not have succeeded on ${{ matrix.name }}"
239+
fi
240+
241+
rm -rf "$WORKDIR"
242+
243+
# ── Embedded binary execution ────────────────────────────────
244+
245+
- name: test embedded mtsh (unix)
246+
if: runner.os != 'Windows'
247+
run: |
248+
# caboose embeds mtsh at /zip/bin/mtsh — test via toast command
249+
OUTPUT=$(./caboose.com toast -c "echo toast-ok" 2>&1) || true
250+
echo "Output: $OUTPUT"
251+
if echo "$OUTPUT" | grep -q "toast-ok"; then
252+
echo "PASS: embedded mtsh works on ${{ matrix.name }}"
253+
else
254+
echo "WARNING: embedded mtsh may not work on ${{ matrix.name }}"
255+
echo "(this is expected on some platforms)"
256+
fi
257+
258+
summary:
259+
needs: test
260+
runs-on: ubuntu-latest
261+
if: always()
262+
steps:
263+
- name: generate summary
264+
run: |
265+
cat >> "$GITHUB_STEP_SUMMARY" <<'EOF'
266+
## Caboose Cross-Platform Results
267+
268+
Tests caboose.com (Mexican Toaster state machine) across 6 platforms:
269+
270+
| Test | Platforms |
271+
|------|-----------|
272+
| help, check, status | All 6 (Linux/macOS/Windows x86_64/aarch64) |
273+
| ls, cat (ZIP filesystem) | All 6 |
274+
| thaw/discard lifecycle | Linux only (requires namespaces) |
275+
| embedded mtsh execution | Unix only |
276+
277+
See individual job logs for per-platform pass/fail details.
278+
EOF
279+
# last-triggered: 2026-03-08T00:57:24Z

0 commit comments

Comments
 (0)