Skip to content

Commit

Permalink
Update sizes.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PBrunot committed Apr 27, 2024
1 parent 442f015 commit 0fa579b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/sizes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0fa579b

Please sign in to comment.