Merge pull request #194 from danielinux/footprint

Added automated footprint regression tests
pull/196/head
David Garske 2022-04-08 11:19:07 -07:00 committed by GitHub
commit 6b61b812a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 1 deletions

44
.github/workflows/footprint.yml vendored 100644
View File

@ -0,0 +1,44 @@
name: Footprint test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
# Get the arm-non-eabi-gcc toolchain
- name: Install arm-none-eabi-gcc
uses: fiam/arm-none-eabi-gcc@v1
with:
# The arm-none-eabi-gcc release to use.
release: "9-2019-q4"
- name: make clean
run: |
make clean && make -C tools/keytools clean && rm -f include/target.h
- name: Install wolfSSL
run: |
sudo apt-get install --no-install-recommends -y -q make libwolfssl-dev
- name: Select config
run: |
cp config/examples/stm32f4.config .config && make include/target.h
- name: Build key tools
run: |
make -C tools/keytools
- name: Build wolfboot and test footprint
run: |
make test-size-all

View File

@ -10,7 +10,7 @@ endif
ifeq ($(SIGN),NONE)
SIGN_OPTIONS+=--no-sign
PRIVATE_KEY=
STACK_USAGE=1180
STACK_USAGE=1216
CFLAGS+=-DWOLFBOOT_NO_SIGN
endif

View File

@ -66,6 +66,11 @@ $(EXPVER):
$(BINASSEMBLE):
$(MAKE) -C $(dir $@)
test-size: FORCE
$(Q)make clean
$(Q)make wolfboot.bin
$(Q)FP=`$(SIZE) -A wolfboot.elf | awk -e ' /Total/ {print $$2;}'`; echo SIZE: $$FP LIMIT: $$LIMIT; test $$FP -le $$LIMIT
# Testbed actions
#
#
@ -759,3 +764,16 @@ test-all: clean
make test-no-asm-smallstack
make test-fastmath-smallstack
make test-delta-update
test-size-all:
make test-size SIGN=NONE LIMIT=4602
make test-size SIGN=ED25519 LIMIT=10670
make test-size SIGN=ECC256 LIMIT=21538
make test-size SIGN=ECC256 NO_ASM=1 LIMIT=13042
make test-size SIGN=RSA2048 LIMIT=10538
make test-size SIGN=RSA2048 NO_ASM=1 LIMIT=11626
make test-size SIGN=RSA4096 LIMIT=10894
make test-size SIGN=RSA4096 NO_ASM=1 LIMIT=11910
make test-size SIGN=ECC384 LIMIT=16866
make test-size SIGN=ECC384 NO_ASM=1 LIMIT=14294
make test-size SIGN=ED448 LIMIT=12830