Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e3038e85f |
@@ -115,13 +115,8 @@ jobs:
|
|||||||
runs-on: anvil
|
runs-on: anvil
|
||||||
needs: [cppcheck, flawfinder, gitleaks]
|
needs: [cppcheck, flawfinder, gitleaks]
|
||||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true' || startsWith(github.ref, 'refs/tags/v')
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true' || startsWith(github.ref, 'refs/tags/v')
|
||||||
container:
|
# Run on host for local network access to sensors
|
||||||
image: docker.io/espressif/idf:v5.3
|
|
||||||
options: --network=host
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install tools
|
|
||||||
run: apt-get update && apt-get install -y --no-install-recommends git curl jq netcat-openbsd
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --branch=${{ github.ref_name }} \
|
git clone --depth=1 --branch=${{ github.ref_name }} \
|
||||||
@@ -129,7 +124,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build firmware
|
- name: Build firmware
|
||||||
run: |
|
run: |
|
||||||
. /opt/esp/idf/export.sh
|
. $HOME/esp/esp-idf/export.sh
|
||||||
cd get-started/csi_recv_router
|
cd get-started/csi_recv_router
|
||||||
idf.py build
|
idf.py build
|
||||||
|
|
||||||
@@ -204,13 +199,23 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
SENSORS="muddy-storm:192.168.129.29 amber-maple:192.168.129.30 hollow-acorn:192.168.129.31"
|
SENSORS="muddy-storm:192.168.129.29 amber-maple:192.168.129.30 hollow-acorn:192.168.129.31"
|
||||||
EXPECTED_VERSION="${{ github.ref_name }}"
|
EXPECTED_VERSION="${{ github.ref_name }}"
|
||||||
|
OTA_PORT=8899
|
||||||
|
|
||||||
# Use Gitea release URL (uploaded in previous step)
|
# Get host IP on local network
|
||||||
FIRMWARE_URL="https://git.mymx.me/${{ github.repository }}/releases/download/${{ github.ref_name }}/csi_recv_router.bin"
|
RUNNER_IP=$(ip route get 192.168.129.29 | grep -oP 'src \K[0-9.]+')
|
||||||
|
echo "Runner IP: $RUNNER_IP"
|
||||||
|
|
||||||
|
# Start local HTTP server
|
||||||
|
cd get-started/csi_recv_router/build
|
||||||
|
python3 -m http.server $OTA_PORT &
|
||||||
|
HTTP_PID=$!
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
FIRMWARE_URL="http://${RUNNER_IP}:${OTA_PORT}/csi_recv_router.bin"
|
||||||
echo "Firmware URL: $FIRMWARE_URL"
|
echo "Firmware URL: $FIRMWARE_URL"
|
||||||
|
|
||||||
# Verify firmware is accessible
|
# Verify server is running
|
||||||
curl -sI "$FIRMWARE_URL" | head -1
|
curl -sI "http://localhost:${OTA_PORT}/csi_recv_router.bin" | head -1
|
||||||
|
|
||||||
# Deploy to all sensors in parallel
|
# Deploy to all sensors in parallel
|
||||||
echo "=== Deploying to all sensors in parallel ==="
|
echo "=== Deploying to all sensors in parallel ==="
|
||||||
@@ -259,6 +264,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Stop HTTP server
|
||||||
|
kill $HTTP_PID 2>/dev/null || true
|
||||||
|
|
||||||
# Final status
|
# Final status
|
||||||
echo "=== Final sensor status ==="
|
echo "=== Final sensor status ==="
|
||||||
for entry in $SENSORS; do
|
for entry in $SENSORS; do
|
||||||
|
|||||||
Reference in New Issue
Block a user