2 Commits

Author SHA1 Message Date
user
1377abe248 ci: Run deploy on host instead of container for network access
Some checks failed
Lint & Build / Deploy to ESP Fleet (push) Has been cancelled
Lint & Build / Security Flaw Analysis (push) Has been cancelled
Lint & Build / Secret Scanning (push) Has been cancelled
Lint & Build / Shell Script Analysis (push) Has been cancelled
Lint & Build / C/C++ Static Analysis (push) Has been cancelled
Lint & Build / Build Firmware (push) Has been cancelled
2026-02-05 22:09:47 +01:00
user
551225d308 fix: Remove unused app_size variable (cppcheck)
All checks were successful
Lint & Build / C/C++ Static Analysis (push) Successful in 29s
Lint & Build / Security Flaw Analysis (push) Successful in 22s
Lint & Build / Secret Scanning (push) Successful in 8s
Lint & Build / Shell Script Analysis (push) Successful in 10s
Lint & Build / Build Firmware (push) Successful in 2m21s
Lint & Build / Deploy to ESP Fleet (push) Successful in 3m20s
2026-02-05 22:08:30 +01:00
2 changed files with 12 additions and 42 deletions

View File

@@ -68,35 +68,26 @@ jobs:
runs-on: anvil
needs: build
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true' || startsWith(github.ref, 'refs/tags/v')
container:
image: docker.io/espressif/idf:v5.3
options: --network host
volumes:
- /var/cache/ccache:/ccache
env:
CCACHE_DIR: /ccache
IDF_CCACHE_ENABLE: 1
# Run directly on host (no container) to access local network
steps:
- name: Install tools
run: |
apt-get update && apt-get install -y --no-install-recommends netcat-openbsd curl jq ccache
- name: Checkout
run: |
git clone --depth=1 --branch=${{ github.ref_name }} \
https://oauth2:${{ github.token }}@git.mymx.me/${{ github.repository }}.git .
https://oauth2:${{ github.token }}@git.mymx.me/${{ github.repository }}.git workspace
cd workspace
- name: Build firmware
run: |
. /opt/esp/idf/export.sh
cd workspace
. $HOME/esp/esp-idf/export.sh
cd get-started/csi_recv_router
idf.py build
ccache --show-stats | head -5
- name: Create release and upload firmware
env:
GITEA_TOKEN: ${{ github.token }}
run: |
cd workspace
TAG="${{ github.ref_name }}"
REPO="${{ github.repository }}"
API_URL="https://git.mymx.me/api/v1"
@@ -129,9 +120,9 @@ jobs:
- name: Deploy via OTA
run: |
cd workspace
SENSORS="muddy-storm:192.168.129.29 amber-maple:192.168.129.30 hollow-acorn:192.168.129.31"
OTA_PORT=8899
MAX_PARALLEL=3
# Get runner IP (first non-loopback interface)
RUNNER_IP=$(hostname -I | awk '{print $1}')
@@ -149,30 +140,17 @@ jobs:
# Verify server is running
curl -sI "http://localhost:${OTA_PORT}/csi_recv_router.bin" | head -1
# Deploy function
deploy_sensor() {
NAME="$1"
IP="$2"
URL="$3"
echo "=== Starting OTA on $NAME ($IP) ==="
RESPONSE=$(echo "OTA $URL" | nc -u -w 2 "$IP" 5501 2>/dev/null || echo "no response")
echo "$NAME: $RESPONSE"
}
# Deploy to all sensors in parallel (max $MAX_PARALLEL)
# Deploy to all sensors in parallel
echo "=== Deploying to all sensors in parallel ==="
PIDS=""
for entry in $SENSORS; do
NAME="${entry%%:*}"
IP="${entry##*:}"
deploy_sensor "$NAME" "$IP" "$FIRMWARE_URL" &
PIDS="$PIDS $!"
echo "=== Starting OTA on $NAME ($IP) ==="
echo "OTA $FIRMWARE_URL" | nc -u -w 2 "$IP" 5501 &
done
# Wait for all OTA commands to be sent
for PID in $PIDS; do
wait $PID 2>/dev/null || true
done
# Wait for OTA commands to be sent
wait
echo "=== OTA commands sent, waiting for devices to update (60s) ==="
sleep 60

View File

@@ -1532,14 +1532,6 @@ static int cmd_handle(const char *cmd, char *reply, size_t reply_size)
/* Partition info */
const esp_partition_t *running = esp_ota_get_running_partition();
uint32_t part_size = running ? running->size : 0;
uint32_t app_size = 0;
if (running) {
esp_app_desc_t desc;
if (esp_ota_get_partition_description(running, &desc) == ESP_OK) {
/* App size not directly available, use partition size */
app_size = part_size;
}
}
snprintf(reply, reply_size,
"OK STATUS uptime=%s uptime_s=%lld heap=%lu rssi=%d channel=%d tx_power=%d rate=%d csi_rate=%d"