2021-06-05 02:57:55 +08:00
|
|
|
name: Footprint Delta
|
|
|
|
|
|
|
|
on: pull_request
|
|
|
|
|
2022-10-14 00:52:31 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-06-05 02:57:55 +08:00
|
|
|
jobs:
|
|
|
|
footprint-delta:
|
2023-10-11 05:32:58 +08:00
|
|
|
runs-on: zephyr-runner-linux-x64-4xlarge
|
2021-08-23 21:12:32 +08:00
|
|
|
if: github.repository == 'zephyrproject-rtos/zephyr'
|
2021-06-05 02:57:55 +08:00
|
|
|
container:
|
2023-09-25 19:58:57 +08:00
|
|
|
image: ghcr.io/zephyrproject-rtos/ci:v0.26.5
|
2021-06-05 02:57:55 +08:00
|
|
|
options: '--entrypoint /bin/bash'
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
env:
|
2023-09-25 19:58:57 +08:00
|
|
|
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
|
2021-06-05 02:57:55 +08:00
|
|
|
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
|
|
|
steps:
|
2022-04-15 02:35:57 +08:00
|
|
|
- name: Apply container owner mismatch workaround
|
|
|
|
run: |
|
|
|
|
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
|
|
|
|
# match the container user UID because of the way GitHub
|
|
|
|
# Actions runner is implemented. Remove this workaround when
|
|
|
|
# GitHub comes up with a fundamental fix for this problem.
|
|
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
|
|
|
|
2021-06-05 02:57:55 +08:00
|
|
|
- name: Update PATH for west
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
|
|
|
|
- name: checkout
|
2022-10-14 01:48:20 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-06-05 02:57:55 +08:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: west setup
|
|
|
|
run: |
|
|
|
|
west init -l . || true
|
2021-11-16 21:53:30 +08:00
|
|
|
west config --global update.narrow true
|
|
|
|
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
|
2021-06-05 02:57:55 +08:00
|
|
|
|
|
|
|
- name: Detect Changes in Footprint
|
|
|
|
env:
|
|
|
|
BASE_REF: ${{ github.base_ref }}
|
|
|
|
run: |
|
|
|
|
export ZEPHYR_BASE=${PWD}
|
|
|
|
git config --global user.email "actions@zephyrproject.org"
|
|
|
|
git config --global user.name "Github Actions"
|
|
|
|
git remote -v
|
|
|
|
git rebase origin/${BASE_REF}
|
|
|
|
git checkout -b this_pr
|
2022-03-04 23:45:31 +08:00
|
|
|
west update
|
2021-06-05 02:57:55 +08:00
|
|
|
west build -b frdm_k64f tests/benchmarks/footprints -t ram_report
|
|
|
|
cp build/ram.json ram2.json
|
|
|
|
west build -b frdm_k64f tests/benchmarks/footprints -t rom_report
|
|
|
|
cp build/rom.json rom2.json
|
|
|
|
|
|
|
|
git checkout origin/${BASE_REF}
|
|
|
|
west update
|
|
|
|
west build -p always -b frdm_k64f tests/benchmarks/footprints -t ram_report
|
|
|
|
west build -b frdm_k64f tests/benchmarks/footprints -t rom_report
|
|
|
|
cp build/ram.json ram1.json
|
|
|
|
cp build/rom.json rom1.json
|
|
|
|
|
|
|
|
git checkout this_pr
|
|
|
|
./scripts/footprint/fpdiff.py ram1.json ram2.json
|
|
|
|
./scripts/footprint/fpdiff.py rom1.json rom2.json
|