5e50593738
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Check code size
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/*.yml'
|
|
- 'tools/**'
|
|
- 'py/**'
|
|
- 'extmod/**'
|
|
- 'lib/**'
|
|
- 'ports/bare-arm/**'
|
|
- 'ports/minimal/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 100
|
|
- name: Install packages
|
|
run: source tools/ci.sh && ci_code_size_setup
|
|
- name: Build
|
|
run: source tools/ci.sh && ci_code_size_build
|
|
- name: Compute code size difference
|
|
run: tools/metrics.py diff ~/size0 ~/size1 | tee diff
|
|
- 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@v3
|
|
with:
|
|
name: code-size-report
|
|
path: |
|
|
diff
|
|
pr_number
|
|
retention-days: 1
|