@@ -57,6 +57,34 @@ permissions:
5757jobs :
5858 smoke_test :
5959 runs-on : ubuntu-22.04
60+ strategy :
61+ fail-fast : false
62+ matrix :
63+ # -- Architecture --
64+ arch :
65+ - name : ARC
66+ board : qemu_arc/qemu_arc_hs
67+ target : ARC
68+ toolchains : arc-zephyr-elf:arc64-zephyr-elf
69+ - name : x86-32
70+ board : qemu_x86
71+ target : X86_32
72+ toolchains : x86_64-zephyr-elf
73+ # -- Sample variant --
74+ sample :
75+ - name : simple
76+ path : simple
77+ extra_cmake : " "
78+ verify : ' "Hello world!" "elapsed"'
79+ - name : user-mode
80+ path : user-mode
81+ extra_cmake : " "
82+ verify : ' "Hello world!" "elapsed"'
83+ - name : user-mode prebuilt
84+ path : user-mode
85+ extra_cmake : " -DWAMR_USE_PREBUILT_LIB=1"
86+ verify : ' "Hello world!" "elapsed"'
87+ name : ${{ matrix.sample.name }} (${{ matrix.arch.name }})
6088 container :
6189 # For Zephyr 3.7 LTS, use the v0.26-branch or the latest v0.26.x release Docker image.
6290 # ci require a larger runner to avoid "no space left on device"
@@ -94,70 +122,16 @@ jobs:
94122 app-path : application
95123 manifest-file-name : west_lite.yml
96124 sdk-version : ${{ env.ZEPHYR_SDK_VERSION }}
97- toolchains : arc-zephyr-elf:arc64-zephyr-elf:x86_64-zephyr-elf
125+ toolchains : ${{ matrix.arch.toolchains }}
98126
99- - name : Build and run simple sample (ARC)
127+ - name : Build and run
100128 shell : bash
101129 run : |
102- pushd product-mini/platforms/zephyr/simple
103- west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC
130+ pushd product-mini/platforms/zephyr/${{ matrix.sample.path }}
131+ west build . -b ${{ matrix.arch.board }} -p always -- \
132+ -DWAMR_BUILD_TARGET=${{ matrix.arch.target }} ${{ matrix.sample.extra_cmake }}
104133 popd
105134
106135 .github/scripts/run_qemu_and_verify.sh \
107- product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed"
108- working-directory : modules/wasm-micro-runtime
109-
110- - name : Build and run user-mode sample (ARC)
111- shell : bash
112- run : |
113- pushd product-mini/platforms/zephyr/user-mode
114- west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC
115- popd
116-
117- .github/scripts/run_qemu_and_verify.sh \
118- product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed"
119- working-directory : modules/wasm-micro-runtime
120-
121- - name : Build and run user-mode sample with prebuilt library (ARC)
122- shell : bash
123- run : |
124- pushd product-mini/platforms/zephyr/user-mode
125- west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC -DWAMR_USE_PREBUILT_LIB=1
126- popd
127-
128- .github/scripts/run_qemu_and_verify.sh \
129- product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed"
130- working-directory : modules/wasm-micro-runtime
131-
132- - name : Build and run simple sample (x86-32)
133- shell : bash
134- run : |
135- pushd product-mini/platforms/zephyr/simple
136- west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32
137- popd
138-
139- .github/scripts/run_qemu_and_verify.sh \
140- product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed"
141- working-directory : modules/wasm-micro-runtime
142-
143- - name : Build and run user-mode sample (x86-32)
144- shell : bash
145- run : |
146- pushd product-mini/platforms/zephyr/user-mode
147- west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32
148- popd
149-
150- .github/scripts/run_qemu_and_verify.sh \
151- product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed"
152- working-directory : modules/wasm-micro-runtime
153-
154- - name : Build and run user-mode sample with prebuilt library (x86-32)
155- shell : bash
156- run : |
157- pushd product-mini/platforms/zephyr/user-mode
158- west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 -DWAMR_USE_PREBUILT_LIB=1
159- popd
160-
161- .github/scripts/run_qemu_and_verify.sh \
162- product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed"
136+ product-mini/platforms/zephyr/${{ matrix.sample.path }}/build 10 ${{ matrix.sample.verify }}
163137 working-directory : modules/wasm-micro-runtime
0 commit comments