Skip to content

Commit 81f967e

Browse files
wardviaeneclaude
andauthored
Remove the selftest cloud workflow (retired v1 pod) (#3)
selftest-cloud.yml drove the device benchpod-v1.0.0, the retired v1 pod, so every run failed with "no such device" (last runs Sep 21 and Oct 4). The example stays; its README now shows how to run it over the LAN or the cloud by hand, and points to scenario-sensors-stm32 for a GitHub Actions setup. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7ab9e44 commit 81f967e

4 files changed

Lines changed: 21 additions & 114 deletions

File tree

‎.github/workflows/scenario-cloud.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585
- name: Install xPack OpenOCD
8686
# The SDK flashes through OpenOCD's CMSIS-DAP TCP backend (cmsis_dap_tcp), which is newer
87-
# than OpenOCD 0.12.0 (apt's 0.12.0 lacks it); see selftest-cloud.yml.
87+
# than OpenOCD 0.12.0 (apt's 0.12.0 lacks it).
8888
run: |
8989
V=0.12.0-7
9090
curl -fsSL "https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v$V/xpack-openocd-$V-linux-x64.tar.gz" \

‎.github/workflows/selftest-cloud.yml‎

Lines changed: 0 additions & 82 deletions
This file was deleted.

‎selftest-stm32/README.md‎

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
1-
# STM32 selftest — cloud HIL via GitHub Actions
1+
# STM32 selftest: a minimal hardware-in-the-loop test
22

33
`selftest.c` is a tiny STM32F446 firmware that boots, prints a UART banner ending in
44
`APP_OK`, and exposes a `ping`/`status` console. It's the "hello world" of an EmbeddedCI
55
hardware-in-the-loop test driven entirely from CI.
66

7-
## What the workflow does
7+
## Run it over the cloud
88

9-
[`.github/workflows/selftest-cloud.yml`](../.github/workflows/selftest-cloud.yml) runs on every
10-
change to `selftest.c` (or the workflow itself):
9+
The pod does not have to be on your network: the SDK reaches it **through embeddedci.com**,
10+
flashes the firmware over the cloud, power-cycles the target and asserts the `APP_OK` UART
11+
marker. Use the device name from the **BenchPod** page in the EmbeddedCI web app and an API key
12+
(or a `benchpod login` session):
1113

12-
1. builds `selftest.c` → `build/selftest.elf` (arm-none-eabi + STM32CubeF4),
13-
2. installs the `embeddedci` SDK and runs `pytest selftest-stm32/tests`,
14-
3. the test connects to the device **through embeddedci.com** with the connection
15-
`embeddedci:benchpod-v1.0.0`, flashes the firmware over the cloud, power-cycles the
16-
target, and asserts the `APP_OK` UART marker.
17-
18-
There is **no BenchPod on the GitHub runner** — the physical pod lives wherever it's plugged in
19-
and connects out to embeddedci.com. Auth is the job's **GitHub OIDC token** (`permissions:
20-
id-token: write`); no API key or secret is stored.
21-
22-
## One-time setup
14+
```bash
15+
pip install "embeddedci[pytest]>=2.0,<3"
16+
make CUBE_F4=/path/to/STM32CubeF4
17+
BENCHPOD_API_KEY=eci_... pytest selftest-stm32/tests -v \
18+
--benchpod-connection=embeddedci:<device-name> \
19+
--benchpod-firmware=selftest-stm32/build/selftest.elf
20+
```
2321

24-
1. **Register the device** from the machine wired to the pod:
25-
```bash
26-
benchpod register --connection <pod-ip>
27-
```
28-
then rename it to `benchpod-v1.0.0` on the **BenchPod** page in the EmbeddedCI web app
29-
(names are URL-safe and unique per org).
30-
2. **Trust this repo**: BenchPod → **GitHub Actions** → add `OWNER/REPO` (click *Look up* to fill
31-
the numeric ids) and allow it to drive **benchpod-v1.0.0** (Any device, or this specific one).
22+
To run this from GitHub Actions instead, see [`scenario-sensors-stm32`](../scenario-sensors-stm32)
23+
and its workflow: it authenticates with the job's GitHub OIDC token, so no secret is stored.
3224

3325
## Run it locally (against a pod on your LAN)
3426

‎selftest-stm32/tests/test_selftest.py‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
"""Cloud hardware-in-the-loop self-test for the device registered as ``benchpod-v1.0.0``.
1+
"""Hardware-in-the-loop self-test: flash ``build/selftest.elf`` and check that it boots.
22
3-
Runs in GitHub Actions (see ``.github/workflows/selftest-cloud.yml``): the workflow builds
4-
``selftest.c`` into ``build/selftest.elf``, then pytest drives the device **through
5-
embeddedci.com** — there is no BenchPod on the runner. The connection
6-
``embeddedci:benchpod-v1.0.0`` authenticates with the workflow's GitHub OIDC token, the
7-
server bridges a tunnel to the physical BenchPod, and we flash + UART-verify the firmware
8-
over the cloud exactly as we would locally.
3+
Pass ``--benchpod-connection`` a LAN address or ``embeddedci:<device-name>`` (through
4+
embeddedci.com, authenticated with an API key or a ``benchpod login`` session); the test
5+
flashes and UART-verifies the firmware the same way over either (see the README).
96
107
Wiring (BenchPod logic-analyzer channels → DUT). The pod has no dedicated SWD/UART
118
pins — it exposes 12 generic LA channels (``pins.pin_1`` .. ``pins.pin_12``) and any
@@ -109,7 +106,7 @@ def dut(benchpod, wiring):
109106

110107
@pytest.mark.hardware
111108
def test_selftest_boots_over_cloud(dut, wiring, firmware, build_report):
112-
"""Flash selftest.elf to benchpod-v1.0.0 over the cloud and assert it boots cleanly.
109+
"""Flash selftest.elf to the pod's DUT and assert it boots cleanly.
113110
114111
The ``build_report`` fixture is the opt-in that records this run as a GitHub-sourced build on
115112
embeddedci.com (uploading the firmware and capturing pass/fail) — but only inside GitHub Actions

0 commit comments

Comments
 (0)