mirror of https://github.com/wolfSSL/wolfBoot.git
84 lines
3.1 KiB
YAML
84 lines
3.1 KiB
YAML
name: Simulator self-update and self-header tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ 'master', 'main', 'release/**' ]
|
|
pull_request:
|
|
branches: [ '*' ]
|
|
|
|
jobs:
|
|
self_update_simulator_test:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/wolfssl/wolfboot-ci-sim:v1.0
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Trust workspace
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Run self-update test (internal flash)
|
|
run: |
|
|
cp config/examples/sim-self-update.config .config
|
|
make test-sim-self-update
|
|
|
|
- name: Run self-update test (external flash)
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-update-ext.config .config
|
|
make test-sim-self-update-ext
|
|
|
|
- name: Run monolithic self-update test
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-update-monolithic.config .config
|
|
make test-sim-self-update-monolithic
|
|
|
|
# Shrink BOOT below the payload size so staging only works because the
|
|
# UPDATE partition is sized independently (WOLFBOOT_PARTITION_UPDATE_SIZE)
|
|
- name: Run monolithic self-update test (payload exceeds a BOOT-sized slot)
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-update-monolithic.config .config
|
|
make test-sim-self-update-monolithic WOLFBOOT_PARTITION_SIZE=0x30000 WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x50000
|
|
|
|
# Unset WOLFBOOT_PARTITION_UPDATE_SIZE so it falls back to
|
|
# WOLFBOOT_PARTITION_SIZE, restoring the legacy symmetric layout
|
|
- name: Run monolithic self-update test (legacy symmetric layout)
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-update-monolithic.config .config
|
|
make test-sim-self-update-monolithic WOLFBOOT_PARTITION_SIZE=0x80000 WOLFBOOT_PARTITION_UPDATE_SIZE= WOLFBOOT_PARTITION_UPDATE_ADDRESS=0xA0000
|
|
|
|
- name: Run monolithic self-update oversize rejection test
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-update-monolithic.config .config
|
|
make test-sim-self-update-monolithic-oversize
|
|
|
|
- name: Run self-header verification test (internal flash)
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-header.config .config
|
|
make test-sim-self-header-verify
|
|
|
|
- name: Run self-header verification test (external flash)
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-header-ext.config .config
|
|
make test-sim-self-header-ext-verify
|
|
|
|
# With WOLFBOOT_SELF_HEADER=1 the app grows enough that the payload
|
|
# exceeds what a BOOT-sized slot could stage, so this step also covers
|
|
# asymmetric staging capacity
|
|
- name: Run combined monolithic self-update + self-header test
|
|
run: |
|
|
make clean
|
|
cp config/examples/sim-self-update-monolithic.config .config
|
|
make test-sim-self-update-monolithic-self-header WOLFBOOT_SELF_HEADER=1 WOLFBOOT_PARTITION_SELF_HEADER_ADDRESS=0x1F000
|
|
|