Added automated footprint regression tests

pull/194/head
Daniele Lacamera 2022-04-08 10:32:46 +02:00
parent 30e5ffa4c3
commit 6ff04647e9
2 changed files with 61 additions and 0 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

@ -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,15 @@ test-all: clean
make test-no-asm-smallstack
make test-fastmath-smallstack
make test-delta-update
test-size-all:
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