mirror of
https://github.com/micropython/micropython.git
synced 2026-04-24 18:00:24 +02:00
2ccf78ae19
Intended to catch problems where new features don't build in old ESP-IDF. Includes major refactor to the GitHub Actions Workflow for esp32 port, including making a reusable workflow for both Code Size and ESP32 build jobs. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
name: Check code size
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/*.yml'
|
|
- 'tools/**'
|
|
- 'py/**'
|
|
- 'extmod/**'
|
|
- 'shared/**'
|
|
- 'lib/**'
|
|
- 'ports/bare-arm/**'
|
|
- 'ports/esp32/**'
|
|
- '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-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 100
|
|
- name: Install packages
|
|
run: tools/ci.sh code_size_setup
|
|
|
|
- name: Find IDF_NEWEST_VER
|
|
id: idf_ver
|
|
run: |
|
|
echo "IDF_VER="$(yq .env.IDF_NEWEST_VER < .github/workflows/ports_esp32.yml) \
|
|
| tee "${GITHUB_OUTPUT}"
|
|
|
|
- name: Setup ESP-IDF
|
|
uses: ./.github/actions/setup_esp32
|
|
with:
|
|
idf_ver: ${{ steps.idf_ver.outputs.IDF_VER }}
|
|
ccache_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@v7
|
|
with:
|
|
name: code-size-report
|
|
path: |
|
|
diff
|
|
pr_number
|
|
retention-days: 1
|