Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/esp32p4-smv-injector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ jobs:
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
timeout-minutes: 25
env:
# ESP-IDF image already enables ccache. Persist only compiler objects,
# never firmware images or sourceCommit manifests.
CCACHE_DIR: ${{ github.workspace }}/.cache/ccache
CCACHE_MAXSIZE: 350M
CCACHE_COMPILERCHECK: content
container:
image: espressif/idf:v5.5.4
defaults:
Expand All @@ -66,6 +72,25 @@ jobs:
# synthetic merge SHA that may change between queue and build.
ref: ${{ github.event.pull_request.head.sha || github.sha }}

# QML-only commits share a bounded compiler-object cache; the firmware
# itself is always rebuilt and stamped with the exact checkout SHA.
- name: Restore ESP-IDF compiler object cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: esp32p4-idf554-ccache-v1-${{ runner.os }}-${{ hashFiles('embedded/esp32p4_smv_injector/**', 'include/ariec61850/asn1/**', 'include/ariec61850/ethernet/**', 'include/ariec61850/mms/utc_time.hpp', 'include/ariec61850/time_sync/**', 'include/ariec61850/sampled_values/**', 'src/asn1/**', 'src/ethernet/**', 'src/mms/utc_time.cpp', 'src/time_sync/**', 'src/sampled_values/**', '.github/workflows/esp32p4-smv-injector.yml') }}
restore-keys: |
esp32p4-idf554-ccache-v1-${{ runner.os }}-

- name: Reset compiler cache statistics
run: |
if command -v ccache >/dev/null 2>&1; then
ccache --zero-stats
echo "Compiler cache ready at ${CCACHE_DIR}"
else
echo 'ccache unavailable; preserve mandatory standard build'
fi

- name: Pin semantic firmware build ID to the exact checkout
run: |
set -euo pipefail
Expand Down Expand Up @@ -141,6 +166,13 @@ jobs:
- name: Build firmware
run: source /opt/esp/idf/export.sh && idf.py build

- name: Report ESP-IDF compiler cache use
if: always()
run: |
if command -v ccache >/dev/null 2>&1; then
ccache --show-stats
fi

- name: Create single-image recovery firmware
run: |
set -euo pipefail
Expand Down
Loading