Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 28 additions & 0 deletions .github/workflows/idf_size_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: esp-idf size delta (PR)

on:
pull_request:
targets:
- main

env:
# TODO: Update the below variables for your project
APP_NAME: "Template"
APP_PATH: .
IDF_VERSION: v5.5
IDF_COMPONENT_MANAGER: "0"
FLASH_TOTAL_OVERRIDE: 1500000

jobs:
size-diff:
name: Size diff (${{ env.APP_PATH }})
runs-on: ubuntu-latest
steps:
- name: Run reusable action
uses: esp-cpp/esp-idf-size-delta@main
with:
app_name: ${{ env.APP_NAME }}
app_path: ${{ env.APP_PATH }}
idf_version: ${{ env.IDF_VERSION }}
idf_component_manager: ${{ env.IDF_COMPONENT_MANAGER }}
base_ref: ${{ github.event.pull_request.base.sha }}
57 changes: 57 additions & 0 deletions .github/workflows/idf_size_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: esp-idf release size delta (Release)

on:
release:
types: [published]
workflow_dispatch:
inputs:
compare_tag:
description: 'Tag to compare against (leave empty to auto-select previous)'
required: false
default: ''

permissions:
contents: write

env:
# TODO: Update the below variables for your project
APP_NAME: "Template"
APP_PATH: .
IDF_VERSION: v5.5
IDF_COMPONENT_MANAGER: "0"
FLASH_TOTAL_OVERRIDE: 1500000

jobs:
size-diff-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Determine base ref
id: base
shell: bash
run: |
set -euo pipefail
COMPARE_TAG_INPUT="${{ github.event.inputs.compare_tag || '' }}"
if [ -n "$COMPARE_TAG_INPUT" ]; then
echo "ref=$COMPARE_TAG_INPUT" >> "$GITHUB_OUTPUT"
else
# use the previous tag chronologically
prev=$(git tag --sort=-creatordate | sed -n '2p')
if [ -z "$prev" ]; then prev=$(git tag --sort=-v:refname | sed -n '2p'); fi
echo "ref=$prev" >> "$GITHUB_OUTPUT"
fi

- name: Run reusable action
id: size
uses: ./.github/actions/esp-idf-size-delta
with:
app_name: ${{ env.APP_NAME }}
app_path: ${{ env.APP_PATH }}
idf_version: ${{ env.IDF_VERSION }}
idf_component_manager: ${{ env.IDF_COMPONENT_MANAGER }}
flash_total_override: ${{ env.FLASH_TOTAL_OVERRIDE }}
base_ref: ${{ steps.base.outputs.ref }}
post_comment: 'false'