Skip to content

Commit 9cca933

Browse files
committed
ci(b_u585): update to use new ocre-sdk build system
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent 8e486e0 commit 9cca933

1 file changed

Lines changed: 10 additions & 35 deletions

File tree

.github/workflows/hardware-bu585.yml

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,10 @@ jobs:
4444
strategy:
4545
matrix:
4646
sample:
47-
- name: generic-hello-world
48-
path: generic/hello-world
49-
filename: hello-world.wasm
50-
- name: generic-subscriber
51-
path: generic/messaging/subscriber
52-
filename: subscriber.wasm
53-
- name: generic-publisher
54-
path: generic/messaging/publisher
55-
filename: publisher.wasm
56-
- name: generic-blinky
57-
path: generic/blinky
58-
filename: blinky.wasm
59-
60-
# Examples for future images to add
61-
# - name: generic-filesystem-full
62-
# path: generic/filesystem-full
63-
# filename: filesystem-full.wasm
64-
# - name: b_u585i-modbus-server
65-
# path: board_specific/b_u585i_iot02a/modbus-server
66-
# filename: modbus-server.wasm
47+
- hello-world
48+
- subscriber
49+
- publisher
50+
- blinky
6751

6852
steps:
6953
- name: Cleanup workspace
@@ -80,26 +64,17 @@ jobs:
8064

8165
- name: Build WASM sample
8266
run: |
83-
SAMPLE_DIR=$GITHUB_WORKSPACE/ocre-runtime/ocre-sdk/${{ matrix.sample.path }}
84-
if [ ! -d "$SAMPLE_DIR" ]; then
85-
echo "Directory not found: $SAMPLE_DIR"
86-
exit 1
87-
fi
88-
89-
mkdir -p "$SAMPLE_DIR/build"
90-
cd "$SAMPLE_DIR/build"
91-
cmake .. -DCMAKE_TOOLCHAIN_FILE=$WASI_SDK_PATH/share/cmake/wasi-sdk.cmake
92-
make
93-
94-
env:
95-
WASI_SDK_PATH: /opt/wasi-sdk
67+
mkdir -p "ocre-runtime/ocre-sdk/build"
68+
cd "ocre-runtime/ocre-sdk/build"
69+
cmake ..
70+
make ${{ matrix.sample }}
9671
9772
# Saving files to the runner so avoid uploading .wasm files as artifacts individually, uploaded in separate step
9873
- name: Save .wasm artifact locally
9974
if: always()
10075
run: |
101-
mkdir /var/ocre-ci-files/wasm/${{ matrix.sample.name }}/
102-
cp "ocre-runtime/ocre-sdk/${{ matrix.sample.path }}/build/${{ matrix.sample.filename }}" "/var/ocre-ci-files/wasm/${{ matrix.sample.name }}/${{ matrix.sample.filename }}"
76+
mkdir /var/ocre-ci-files/wasm/${{ matrix.sample }}/
77+
cp "ocre-runtime/ocre-sdk/build/dist/${{ matrix.sample }}.wasm" "/var/ocre-ci-files/wasm/${{ matrix.sample }}/${{ matrix.sample }}.wasm"
10378
10479
artifact-wasm-files:
10580
name: Artifact built .wasm Files

0 commit comments

Comments
 (0)