@@ -209,7 +209,6 @@ jobs:
209209
210210 - name : Build WASM sample
211211 run : |
212-
213212 SAMPLE_DIR=$GITHUB_WORKSPACE/ocre-sdk/${{ matrix.sample.path }}
214213 if [ ! -d "$SAMPLE_DIR" ]; then
215214 echo "Directory not found: $SAMPLE_DIR"
@@ -235,7 +234,7 @@ jobs:
235234 if : always()
236235 uses : actions/upload-artifact@v4
237236 with :
238- name : " ${{ matrix.sample.name }}.wasm "
237+ name : " ${{ matrix.sample.name }}"
239238 path : " ocre-sdk/${{ matrix.sample.path }}/build/${{ matrix.sample.filename }}"
240239
241240 build-and-run-linux-sample :
@@ -245,8 +244,10 @@ jobs:
245244 matrix :
246245 sample :
247246 - name : generic-hello-world
247+ build-file : hello-world.wasm
248248 expected : " powered by Ocre"
249249 - name : generic-filesystem-full
250+ build-file : filesystem-full.wasm
250251 expected : " Directory listing for"
251252 # Add here more samples
252253 steps :
@@ -278,8 +279,8 @@ jobs:
278279 - name : Download wasm artifact
279280 uses : actions/download-artifact@v4
280281 with :
281- name : " ${{ matrix.sample.name }}.wasm "
282- path : ${{ matrix.sample.name }}.wasm
282+ name : " ${{ matrix.sample.name }}"
283+ path : ${{ matrix.sample.name }}
283284
284285 - name : Update Submodules
285286 working-directory : application
@@ -296,14 +297,14 @@ jobs:
296297 run : |
297298 ls -lah
298299 ls -lah $GITHUB_WORKSPACE
299- ls -lah $GITHUB_WORKSPACE/${{ matrix.sample.name }}.wasm
300- file $GITHUB_WORKSPACE/${{ matrix.sample.name }}.wasm
300+ ls -lah $GITHUB_WORKSPACE/${{ matrix.sample.name }}
301+ file $GITHUB_WORKSPACE/${{ matrix.sample.name }}
301302
302303 - name : Run Sample ${{ matrix.sample.name }}
303304 working-directory : application/build
304305 run : |
305306 echo "=== Running sample: ${{ matrix.sample.name }} ==="
306- WASM_FILE=$GITHUB_WORKSPACE/${{ matrix.sample.name }}.wasm /${{ matrix.sample.name }}.wasm
307+ WASM_FILE=$GITHUB_WORKSPACE/${{ matrix.sample.name }}/${{ matrix.sample.build-file }}
307308 chmod +x app
308309 stdbuf -oL -eL timeout 20s ./app $WASM_FILE | tee "${{ matrix.sample.name }}_run.log"
309310
@@ -327,7 +328,9 @@ jobs:
327328 sample :
328329 - name : generic-hello-world
329330 expected : " powered by Ocre"
331+ build-file : hello-world.wasm
330332 - name : generic-filesystem-full
333+ build-file : filesystem-full.wasm
331334 expected : " Directory listing for"
332335 steps :
333336 - name : Install tools (xxd + WASI SDK)
@@ -368,8 +371,8 @@ jobs:
368371 if : runner.environment == 'self-hosted'
369372 uses : actions/download-artifact@v4
370373 with :
371- name : " ${{ matrix.sample.name }}.wasm "
372- path : ${{ matrix.sample.name }}.wasm
374+ name : " ${{ matrix.sample.name }}"
375+ path : ${{ matrix.sample.name }}
373376
374377 - name : Update Submodules
375378 working-directory : application
@@ -379,7 +382,7 @@ jobs:
379382 - name : Build Zephyr app
380383 run : |
381384 echo "=== Build app ==="
382- WASM_FILE=$GITHUB_WORKSPACE/${{ matrix.sample.name }}.wasm /${{ matrix.sample.name }}.wasm
385+ WASM_FILE=$GITHUB_WORKSPACE/${{ matrix.sample.name }}/${{ matrix.sample.build-file }}
383386 west build --pristine -b native_sim ./application -d build -- \
384387 -DMODULE_EXT_ROOT=$(pwd)/application \
385388 -DOCRE_INPUT_FILE=$WASM_FILE
@@ -460,14 +463,20 @@ jobs:
460463 if : runner.environment == 'self-hosted'
461464 uses : actions/download-artifact@v4
462465 with :
463- name : b_u585i-modbus-server.wasm
464- path : b_u585i-modbus-server.wasm
466+ name : b_u585i-modbus-server
467+ path : b_u585i-modbus-server
468+
469+ - name : Setup Zephyr project
470+ uses : zephyrproject-rtos/action-zephyr-setup@v1
471+ with :
472+ app-path : application
473+ sdk-version : 0.16.8
465474
466475 - name : Flash b_u585i_iot02a
467476 if : runner.environment == 'self-hosted'
468477 working-directory : application
469478 run : |
470- WASM_FILE=$GITHUB_WORKSPACE/b_u585i-modbus-server.wasm/b_u585i- modbus-server.wasm
479+ WASM_FILE=$GITHUB_WORKSPACE/b_u585i-modbus-server/ modbus-server.wasm
471480 west build --pristine -b b_u585i_iot02a ./application -d build -- \
472481 -DMODULE_EXT_ROOT=$(pwd)/application \
473482 -DOCRE_INPUT_FILE=$WASM_FILE
0 commit comments