Hands-off build → flash → verify pipeline for the AMS flight logger.
Konrad pushes to main; the device gets reflashed and the result appears as a Paperclip comment.
# Full pipeline: compile → upload → smoke test
make pipeline
# Compile only (no device needed)
make build
# Override board or port
make pipeline ENV=t-a7670g-r2-debug PORT=/dev/ttyACM0pip3 install platformio pyserialPlatformIO caches the ESP32 toolchain on first build (~400 MB). Pre-warm it:
make buildAdd your user (or the CI runner user) to the dialout group so it can access USB serial:
sudo usermod -a -G dialout $USER
# Log out and back in, or: newgrp dialoutPlug the board into USB. Verify it appears:
ls /dev/ttyUSB* /dev/ttyACM*
# e.g. /dev/ttyUSB0-
Register a self-hosted runner on the always-on host:
- GitHub → repo → Settings → Actions → Runners → "New self-hosted runner"
- Follow the install instructions; add label
ams-deviceduring setup
-
Add GitHub secrets (repo → Settings → Secrets → Actions):
Secret Value PAPERCLIP_API_KEYAgent JWT (from Paperclip agent settings) PAPERCLIP_API_URLhttp://localhost:3100PAPERCLIP_AMS87_ISSUE_IDUUID of the active tracking issue -
Push to
main— the workflow triggers automatically.
GitHub → Actions → "Firmware pipeline" → "Run workflow"
Optionally specify a different PlatformIO environment or serial port.
| Stage | Tool | Failure exit |
|---|---|---|
| Compile | python3 -m platformio run -e <env> |
Exit 1 |
| Upload | platformio run --target upload --upload-port <port> |
Exit 2 |
| Smoke test | pipeline/smoke_test.py |
Exit 3 |
Run against the *-debug build (includes SIMULATE_GPS + SIMULATE_IMU):
| Check | What is verified |
|---|---|
| Startup banner | AMS Flight Logger in first 5 s |
| NMEA sentence | $GPRMC or $GPGGA within 30 s (echoed by debug build) |
| Non-zero IMU | rms>0.001g in status line |
| State prefix | [GROUND] (or other state) in status line |
Run manually:
make smoke PORT=/dev/ttyUSB0| Env | Board | Notes |
|---|---|---|
t-sim7000g |
T-SIM7000G (Cat-M1) | Production build |
t-sim7000g-debug |
T-SIM7000G | GPS+IMU simulated; echoes NMEA to serial |
t-a7670g-r2 |
T-A7670G R2 (Cat-1 + L76K) | Production build |
t-a7670g-r2-debug |
T-A7670G R2 | GPS+IMU simulated; echoes NMEA to serial |
Default pipeline environment: t-sim7000g-debug.
To target production firmware against live GPS/IMU, pass ENV=t-sim7000g.
Note: smoke test NMEA assertion requires a debug build or a live GPS lock.
After each run, pipeline/post_result.sh posts a comment to the Paperclip issue
with pass/fail status and the last 20 lines of pipeline/last_run.log.
Requires PAPERCLIP_API_KEY and PAPERCLIP_API_URL set in environment.
no USB serial port found
→ Device not plugged in, or kernel module not loaded. Run dmesg | tail -20 after plugging in.
Permission denied: /dev/ttyUSB0
→ Add user to dialout group (see Host Setup above).
Upload fails with esptool.py: error: argument --port
→ Port auto-detection failed; pass --port /dev/ttyUSBx explicitly.
Smoke test: NMEA not seen within 30 s
→ Check you're using a *-debug build. Production builds do not echo raw NMEA.
Smoke test: no startup banner within 5 s
→ Board didn't reset after upload; power-cycle and re-run make smoke.