mirror of
https://github.com/micropython/micropython.git
synced 2026-01-11 06:27:14 +01:00
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: Check code size
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/*.yml'
|
|
- 'tools/**'
|
|
- 'py/**'
|
|
- 'extmod/**'
|
|
- 'shared/**'
|
|
- 'lib/**'
|
|
- 'ports/bare-arm/**'
|
|
- 'ports/mimxrt/**'
|
|
- 'ports/minimal/**'
|
|
- 'ports/rp2/**'
|
|
- 'ports/samd/**'
|
|
- 'ports/stm32/**'
|
|
- 'ports/unix/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 100
|
|
- name: Install packages
|
|
run: tools/ci.sh code_size_setup
|
|
|
|
# Needs to be kept in synch with ports_esp32.yml
|
|
- id: idf_ver
|
|
name: Read the ESP-IDF version (including Python version) and set outputs.IDF_VER
|
|
run: tools/ci.sh esp32_idf_ver | tee "${GITHUB_OUTPUT}"
|
|
- name: Cached ESP-IDF install
|
|
id: cache_esp_idf
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
./esp-idf/
|
|
~/.espressif/
|
|
!~/.espressif/dist/
|
|
~/.cache/pip/
|
|
key: esp-idf-${{ steps.idf_ver.outputs.IDF_VER }}
|
|
- name: Install ESP-IDF packages
|
|
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
|
|
run: tools/ci.sh esp32_idf_setup
|
|
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
with:
|
|
key: code_size
|
|
|
|
- name: Build
|
|
run: tools/ci.sh code_size_build
|
|
- name: Compute code size difference
|
|
run: source tools/ci.sh && ci_code_size_report
|
|
- name: Save PR number
|
|
if: github.event_name == 'pull_request'
|
|
env:
|
|
PR_NUMBER: ${{ github.event.number }}
|
|
run: echo $PR_NUMBER > pr_number
|
|
- name: Upload diff
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: code-size-report
|
|
path: |
|
|
diff
|
|
pr_number
|
|
retention-days: 1
|