Skip to content

Commit 362c853

Browse files
build modbus within image, flash from host
1 parent e9719dc commit 362c853

1 file changed

Lines changed: 31 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,16 @@ jobs:
424424
path: /tmp/flashValidation.log
425425

426426

427-
flash-zephyr-modbus_server-b_u585i_iot02a:
428-
needs: [build-wasm-files, flash-validation-tests]
427+
build-zephyr-modbus_server-b_u585i_iot02a:
428+
needs: [build-wasm-files]
429429
runs-on: zephyr-xlarge-runner
430430
container:
431431
image: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
432432
options: --user root
433-
steps:
433+
steps:
434+
- name: Cleanup workspace
435+
uses: eviden-actions/clean-self-hosted-runner@v1
436+
434437
- name: Checkout current repository
435438
uses: actions/checkout@v4
436439
with:
@@ -455,8 +458,7 @@ jobs:
455458
env:
456459
WASI_SDK_PATH: /opt/wasi-sdk
457460

458-
- name: Download Zephyr build artifact(b_u585i_iot02a)
459-
if: runner.environment == 'self-hosted'
461+
- name: Download WASM artifact
460462
uses: actions/download-artifact@v4
461463
with:
462464
name: b_u585i-modbus-server
@@ -468,23 +470,37 @@ jobs:
468470
app-path: application
469471
sdk-version: 0.16.8
470472

471-
- name: Test flash requirements
472-
continue-on-error: true
473-
run: |
474-
ls
475-
file b_u585i-modbus-server
476-
ls b_u585i-modbus-server
477-
478-
- name: Flash b_u585i_iot02a
479-
if: runner.environment == 'self-hosted'
473+
- name: Build b_u585i_iot02a with modbus-server
480474
run: |
481475
WASM_FILE=$GITHUB_WORKSPACE/b_u585i-modbus-server/modbus-server.wasm
482476
west -v build --pristine=auto -b b_u585i_iot02a ./application -d build -- \
483477
-DMODULE_EXT_ROOT=$(pwd)/application \
484478
-DOCRE_INPUT_FILE=$WASM_FILE \
485479
-DTARGET_PLATFORM_NAME=Zephyr
486480
487-
west flash
481+
- name: Upload b_u585i_iot02a modbus-server build artifact
482+
if: job.status == 'success'
483+
uses: actions/upload-artifact@v4
484+
with:
485+
name: ocre-zephyr-b_u585i_iot02a-modbus-server
486+
path: |
487+
build/zephyr/zephyr.bin
488+
build/zephyr/zephyr.hex
489+
490+
flash-zephyr-modbus_server-b_u585i_iot02a:
491+
needs: [build-zephyr-modbus_server-b_u585i_iot02a, flash-validation-tests]
492+
runs-on: zephyr-xlarge-runner
493+
steps:
494+
- name: Download Zephyr build artifact (b_u585i_iot02a modbus-server)
495+
if: runner.environment == 'self-hosted'
496+
uses: actions/download-artifact@v4
497+
with:
498+
name: ocre-zephyr-b_u585i_iot02a-modbus-server
499+
500+
- name: Flash b_u585i_iot02a
501+
if: runner.environment == 'self-hosted'
502+
run: |
503+
STM32_Programmer_CLI -c port=swd -e all -w zephyr.bin 0x08000000 -v -rst
488504
489505
modbus-server-validation-tests:
490506
needs: flash-zephyr-modbus_server-b_u585i_iot02a

0 commit comments

Comments
 (0)