Files
wolfssl/.github/workflows/stm32-sim.yml
T
Andrew Hutchings 90359f90e1 Add STM32 emulator from simulators repo
This tests a lot more than the Renode STM32H753 test, so this PR removes
that and adds our own emulator for STM32H753 and STM32U585. This
includes testing the v1 and v2 HAL CRYP / HASH / PKA functionality.
2026-05-12 20:17:11 +02:00

66 lines
2.0 KiB
YAML

name: STM32 simulator test
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
# Build the STM32 software simulator (https://github.com/wolfSSL/simulators,
# STM32Sim/ subdirectory) and run the wolfCrypt test suite on emulated
# STM32H753 (Cortex-M7) and STM32U585 (Cortex-M33) hardware. Replaces the
# previous Renode-based STM32H753 workflow and adds U5/PKA coverage.
#
# Dockerfile.wolfcrypt reads wolfSSL from /opt/wolfssl at runtime via a
# bind mount, so unlike se050-sim.yml / stsafe-a120-sim.yml no Dockerfile
# patching is required - we just mount the PR checkout.
jobs:
stm32_sim:
name: wolfCrypt on STM32${{ matrix.chip_label }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- chip_label: H753
script: run-wolfcrypt-h7.sh
- chip_label: U585
script: run-wolfcrypt-u5.sh
steps:
- name: Checkout wolfSSL (PR source)
uses: actions/checkout@v4
with:
path: wolfssl
- name: Clone STM32 simulator
run: git clone --depth 1 https://github.com/wolfSSL/simulators simulators
- uses: docker/setup-buildx-action@v3
- name: Build stm32sim-wolfcrypt image
uses: docker/build-push-action@v5
with:
context: simulators/STM32Sim
file: simulators/STM32Sim/Dockerfile.wolfcrypt
push: false
load: true
tags: stm32sim-wolfcrypt:ci
cache-from: type=gha,scope=stm32sim
cache-to: type=gha,mode=max,scope=stm32sim
- name: Run wolfCrypt tests on STM32${{ matrix.chip_label }}
run: |
docker run --rm \
-v "${{ github.workspace }}/wolfssl:/opt/wolfssl:ro" \
stm32sim-wolfcrypt:ci \
${{ matrix.script }}