From 0fa579b38933704e4e2902991e6e5e0dbe0e05d0 Mon Sep 17 00:00:00 2001 From: Pascal Brunot Date: Sat, 27 Apr 2024 10:51:12 +0200 Subject: [PATCH] Update sizes.yml --- .github/workflows/sizes.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sizes.yml b/.github/workflows/sizes.yml index 2013339d..2b88be65 100644 --- a/.github/workflows/sizes.yml +++ b/.github/workflows/sizes.yml @@ -38,17 +38,21 @@ jobs: - name: Use secrets.hpp.example as base for the build run: cp conf/secrets.hpp.example conf/secrets.hpp - name: Build PlatformIO Project (current version) - run: pio run --environment ${{ matrix.variant }} --project-option="build_dir=.pio/build/latest" + run: pio run --environment ${{ matrix.variant }} + - name: Copy latest MAP file + run: cp .pio/build/${{ matrix.variant }}/firmware.map firmware.map.latest # Now build the previous version after checkout - name: Checkout previous commit run: git checkout HEAD^ - name: Use secrets.hpp.example as base for the build run: cp conf/secrets.hpp.example conf/secrets.hpp - name: Build PlatformIO Project (previous version) - run: pio run --environment ${{ matrix.variant }} --project-option="build_dir=.pio/build/previous" + run: pio run --environment ${{ matrix.variant }} + - name: Copy previous MAP file + run: cp .pio/build/${{ matrix.variant }}/firmware.map firmware.map.previous # Now compares both MAP files with esp_idf_size - name: Compare MAP files - run: python -m esp_idf_size --format=text --diff=.pio/build/previous/firmware.map .pio/build/latest/firmware.map -o size_report.txt + run: python -m esp_idf_size --format=text --diff=firmware.map.previous firmware.map.latest -o size_report.txt # Upload the size report as an artifact - name: Upload size report uses: actions/upload-artifact@v4