Skip to content

Commit 7739aca

Browse files
committed
Add device-sims job running ATECC608 STSAFE and TROPIC01 sim wolfcrypt tests
1 parent 73423aa commit 7739aca

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/device-sims.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Device sims
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/device-sims.yml'
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
paths:
10+
- '.github/workflows/device-sims.yml'
11+
workflow_call:
12+
inputs:
13+
caller_run_id:
14+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
15+
type: string
16+
default: ''
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ inputs.caller_run_id && format('device-sims-call-{0}', inputs.caller_run_id) || format('device-sims-{0}', github.ref) }}
21+
cancel-in-progress: ${{ !inputs.caller_run_id }}
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
sim:
28+
name: ${{ matrix.sim }} wolfcrypt
29+
runs-on: ubuntu-24.04
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
# SE050Sim is covered natively by se050.yml (runs this repo's demo);
34+
# here we run each sim's own wolfcrypt test via its proven Dockerfile.
35+
sim: [ATECC608Sim, STSAFEA120Sim, TROPIC01Sim]
36+
timeout-minutes: 40
37+
steps:
38+
- name: Fetch wolfSSL/simulators
39+
run: git clone -q --depth 1 https://github.com/wolfSSL/simulators /tmp/sims
40+
41+
# Each Dockerfile.wolfcrypt builds the Rust applet sim + the vendor SDK +
42+
# wolfSSL and runs wolfcrypt against the sim; run_test.sh exits nonzero on
43+
# any failure, so the container's exit code is the assertion.
44+
- name: Build and run ${{ matrix.sim }} wolfcrypt test
45+
run: |
46+
set -euo pipefail
47+
docker build -f "/tmp/sims/${{ matrix.sim }}/Dockerfile.wolfcrypt" \
48+
-t sim-wolfcrypt "/tmp/sims/${{ matrix.sim }}"
49+
docker run --rm sim-wolfcrypt

.github/workflows/nightly.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ jobs:
133133
with:
134134
caller_run_id: ${{ github.run_id }}
135135

136+
device-sims:
137+
needs: [refs]
138+
uses: ./.github/workflows/device-sims.yml
139+
with:
140+
caller_run_id: ${{ github.run_id }}
141+
136142
rpi-pico:
137143
needs: [refs]
138144
uses: ./.github/workflows/rpi-pico.yml

0 commit comments

Comments
 (0)