3 Commits

Author SHA1 Message Date
user
9ece83bac0 ci: Simplify deploy script to pure POSIX sh
All checks were successful
Lint & Build / C/C++ Static Analysis (push) Successful in 35s
Lint & Build / Security Flaw Analysis (push) Successful in 18s
Lint & Build / Secret Scanning (push) Successful in 5s
Lint & Build / Shell Script Analysis (push) Successful in 7s
Lint & Build / Build Firmware (push) Successful in 2m17s
Lint & Build / Deploy to ESP Fleet (push) Successful in 3m28s
2026-02-05 13:28:28 +01:00
user
cfa22e9e2a ci: Fix deploy script for POSIX sh, use explicit bash
Some checks failed
Lint & Build / C/C++ Static Analysis (push) Successful in 35s
Lint & Build / Security Flaw Analysis (push) Successful in 19s
Lint & Build / Secret Scanning (push) Successful in 5s
Lint & Build / Shell Script Analysis (push) Successful in 7s
Lint & Build / Build Firmware (push) Successful in 2m18s
Lint & Build / Deploy to ESP Fleet (push) Failing after 1m51s
2026-02-05 13:21:38 +01:00
user
baf2c69aee ci: Use hardcoded sensor IPs for deploy
Some checks failed
Lint & Build / C/C++ Static Analysis (push) Successful in 34s
Lint & Build / Security Flaw Analysis (push) Successful in 19s
Lint & Build / Secret Scanning (push) Successful in 5s
Lint & Build / Build Firmware (push) Successful in 2m17s
Lint & Build / Shell Script Analysis (push) Successful in 7s
Lint & Build / Deploy to ESP Fleet (push) Failing after 1m51s
2026-02-05 13:14:38 +01:00

View File

@@ -75,40 +75,32 @@ jobs:
- name: Deploy via OTA
run: |
SENSORS="muddy-storm amber-maple hollow-acorn"
PORT=8070
# Get host IP (first non-loopback IPv4)
# Get host IP
HOST_IP=$(hostname -I | awk '{print $1}')
echo "Host IP: $HOST_IP"
# Start HTTP server in background
cd get-started/csi_recv_router/build
python3 -m http.server $PORT &
python3 -m http.server $PORT --bind 0.0.0.0 &
HTTP_PID=$!
sleep 2
# Deploy to each sensor
for sensor in $SENSORS; do
echo "=== Deploying to $sensor ==="
# Resolve mDNS hostname
SENSOR_IP=$(getent hosts ${sensor}.local 2>/dev/null | awk '{print $1}')
if [ -z "$SENSOR_IP" ]; then
SENSOR_IP=$(avahi-resolve -4 -n ${sensor}.local 2>/dev/null | awk '{print $2}')
fi
if [ -z "$SENSOR_IP" ]; then
echo "Warning: Could not resolve $sensor.local, skipping"
continue
fi
echo "Sensor IP: $SENSOR_IP"
# Deploy to muddy-storm
echo "=== Deploying to muddy-storm (192.168.129.29) ==="
echo "OTA http://${HOST_IP}:${PORT}/csi_recv_router.bin" | nc -u -w 2 192.168.129.29 5501 || true
sleep 30
# Send OTA command via UDP
echo "OTA http://${HOST_IP}:${PORT}/csi_recv_router.bin" | nc -u -w 2 $SENSOR_IP 5501
echo "OTA command sent to $sensor"
# Deploy to amber-maple
echo "=== Deploying to amber-maple (192.168.129.30) ==="
echo "OTA http://${HOST_IP}:${PORT}/csi_recv_router.bin" | nc -u -w 2 192.168.129.30 5501 || true
sleep 30
# Wait for device to download and reboot
sleep 30
done
# Deploy to hollow-acorn
echo "=== Deploying to hollow-acorn (192.168.129.31) ==="
echo "OTA http://${HOST_IP}:${PORT}/csi_recv_router.bin" | nc -u -w 2 192.168.129.31 5501 || true
sleep 30
# Cleanup
kill $HTTP_PID 2>/dev/null || true