Stabilize beta CI artifact build #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Header Limit Beta | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - fix/http-header-limit-sdkconfig | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| PIO_PYTHON: ${{ github.workspace }}/.pio-venv/bin/python | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install PlatformIO In Isolated Venv | |
| shell: bash | |
| run: | | |
| python -m venv .pio-venv | |
| "$PIO_PYTHON" -m pip install --upgrade pip | |
| "$PIO_PYTHON" -m pip install platformio | |
| - name: Prime IDF Build Graph | |
| shell: bash | |
| run: | | |
| set +e | |
| "$PIO_PYTHON" -m platformio run -e project_aura > first-pass.log 2>&1 | |
| status=$? | |
| if [ "$status" -eq 0 ]; then | |
| cat first-pass.log | |
| exit 0 | |
| fi | |
| grep -q "https_server.crt.S" first-pass.log || { | |
| cat first-pass.log | |
| exit "$status" | |
| } | |
| grep -nE "HTTPD_MAX_REQ_HDR_LEN|FREERTOS_HZ|https_server\\.crt\\.S|rmaker_.*\\.crt\\.S" first-pass.log || true | |
| - name: Pre-generate Embedded Cert Assembly | |
| shell: bash | |
| run: | | |
| build_dir="$GITHUB_WORKSPACE/.pio/build/project_aura" | |
| script="$HOME/.platformio/packages/framework-espidf/tools/cmake/scripts/data_file_embed_asm.cmake" | |
| certs=( | |
| "$GITHUB_WORKSPACE/managed_components/espressif__esp_insights/server_certs/https_server.crt" | |
| "$GITHUB_WORKSPACE/managed_components/espressif__esp_rainmaker/server_certs/rmaker_mqtt_server.crt" | |
| "$GITHUB_WORKSPACE/managed_components/espressif__esp_rainmaker/server_certs/rmaker_claim_service_server.crt" | |
| "$GITHUB_WORKSPACE/managed_components/espressif__esp_rainmaker/server_certs/rmaker_ota_server.crt" | |
| ) | |
| for cert in "${certs[@]}"; do | |
| out="$build_dir/$(basename "$cert").S" | |
| cmake -D DATA_FILE="$cert" -D SOURCE_FILE="$out" -D FILE_TYPE=TEXT -P "$script" | |
| done | |
| ls -l "$build_dir"/*.crt.S | |
| - name: Build Firmware | |
| shell: bash | |
| run: | | |
| "$PIO_PYTHON" -m platformio run -e project_aura | |
| - name: Verify Header Limit | |
| run: | | |
| grep -n "CONFIG_HTTPD_MAX_REQ_HDR_LEN" .pio/build/project_aura/config/sdkconfig.h | |
| grep -q "CONFIG_HTTPD_MAX_REQ_HDR_LEN 8192" .pio/build/project_aura/config/sdkconfig.h | |
| - name: Upload OTA Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: project_aura-ota-firmware | |
| path: .pio/build/project_aura/firmware.bin | |
| if-no-files-found: error |