Skip to content

Commit 42b1860

Browse files
committed
Rebase was ugly and not correct, this should fix
1 parent 0169415 commit 42b1860

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/trunk.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,30 @@ jobs:
254254
exit 1
255255
fi
256256
257+
elf="cmake-out/test/size_test"
258+
259+
# Dump basic info
260+
ls -al ${elf}
261+
${toolchain_prefix}size ${elf}
262+
263+
# Dump symbol
264+
python .github/scripts/run_nm.py -e ${elf}
265+
python .github/scripts/run_nm.py -e ${elf} -f "executorch" -p "${toolchain_prefix}"
266+
python .github/scripts/run_nm.py -e ${elf} -f "executorch_text" -p "${toolchain_prefix}"
267+
268+
# Add basic guard - TODO: refine this!
269+
${toolchain_prefix}strip ${elf}
270+
output=$(ls -la ${elf})
271+
arr=($output)
272+
size=${arr[4]}
273+
echo "size: $size, threshold: $threshold"
274+
if [[ "$size" -le "$threshold" ]]; then
275+
echo "Success $size <= $threshold"
276+
else
277+
echo "Fail $size > $threshold"
278+
exit 1
279+
fi
280+
257281
nxp-build-test:
258282
name: nxp-build-test
259283
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main

0 commit comments

Comments
 (0)