28
28
env :
29
29
LLVM_CACHE_SUFFIX : " build-llvm_libraries_ex"
30
30
WASI_SDK_PATH : " /opt/wasi-sdk"
31
- WAMR_COMMON_OPTION :
32
- " CONFIG_INTERPRETERS_WAMR=y\\ nCONFIG_INTERPRETERS_WAMR_LOG=y\\ nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\ nCONFIG_INTERPRETERS_WAMR_REF_TYPES=y\\ nCONFIG_INTERPRETERS_WAMR_ENABLE_SPEC_TEST=y\\ nCONFIG_INTERPRETERS_WAMR_SHARED_MEMORY=y\\ nCONFIG_INTERPRETERS_WAMR_BULK_MEMORY=y\\ nCONFIG_EOL_IS_LF=y\\ nCONFIG_LIBC_FLOATINGPOINT=y\\ nCONFIG_INTERPRETERS_WAMR_STACK_GUARD_SIZE=1024\\ n"
33
- HOSTFS_OPTION :
34
- " CONFIG_ARM_SEMIHOSTING_HOSTFS=y\\ nCONFIG_ARM_SEMIHOSTING_HOSTFS_CACHE_COHERENCE=y\\ nCONFIG_RISCV_SEMIHOSTING_HOSTFS=y\\ nCONFIG_FS_HOSTFS=y\\ n"
35
31
36
32
jobs :
37
33
build_llvm_libraries :
@@ -98,26 +94,26 @@ jobs:
98
94
wamr_test_option : [
99
95
{
100
96
mode : " -t aot" ,
101
- option : " CONFIG_INTERPRETERS_WAMR_AOT=y \\ n "
97
+ option : " CONFIG_INTERPRETERS_WAMR_AOT"
102
98
},
103
99
{
104
100
mode : " -t aot -X" ,
105
- option : " CONFIG_INTERPRETERS_WAMR_AOT=y \\ n "
101
+ option : " CONFIG_INTERPRETERS_WAMR_AOT"
106
102
},
107
103
# {
108
104
# mode: "-t classic-interp",
109
- # option: "CONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n "
105
+ # option: "CONFIG_INTERPRETERS_WAMR_CLASSIC"
110
106
# },
111
107
# {
112
108
# mode: "-t fast-interp",
113
- # option: "CONFIG_INTERPRETERS_WAMR_FAST=y\\n "
109
+ # option: "CONFIG_INTERPRETERS_WAMR_FAST"
114
110
# },
115
111
]
116
112
117
113
wamr_feature_option :
118
114
# Empty option for default
119
115
- { option: "", mode: "" }
120
- - { option: "CONFIG_INTERPRETERS_WAMR_GC=y\\nCONFIG_INTERPRETERS_WAMR_AOT_STACK_FRAME=y\\n ", mode: "-G" }
116
+ - { option: "CONFIG_INTERPRETERS_WAMR_GC CONFIG_INTERPRETERS_WAMR_AOT_STACK_FRAME ", mode: "-G" }
121
117
122
118
exclude :
123
119
# XIP is not fully supported yet on RISCV64, some relocations can not be resolved
@@ -194,47 +190,92 @@ jobs:
194
190
echo "\tbool \"Enable Tail Call\"" >> apps/interpreters/wamr/Kconfig
195
191
echo "\tdefault y" >> apps/interpreters/wamr/Kconfig
196
192
193
+ - name : Build wamrc
194
+ if : contains(matrix.wamr_test_option.mode, 'aot')
195
+ working-directory : apps/interpreters/wamr/wamr/wamr-compiler
196
+ run : |
197
+ cmake -Bbuild .
198
+ cmake --build build
199
+
200
+ # the nuttx version we use for xtensa requires esptool.py newer than
201
+ # what we have in our version of the apache-nuttx-ci-linux image.
202
+ - name : Install the latest esptool.py (xtensa)
203
+ if : matrix.target_config.target == 'xtensa'
204
+ run : |
205
+ pip3 install esptool==4.7.0
206
+ esptool.py version
207
+
208
+ - name : Configure NuttX
209
+ run : |
210
+ tools/configure.sh ${{ matrix.target_config.config }}
211
+ working-directory : nuttx
212
+
213
+ # depending on configurations, the iwasm command line generated
214
+ # by spec-test-script can be longer than the default NSH_LINELEN,
215
+ # which is 64 or 80.
197
216
- name : Enable WAMR for NuttX
198
217
run : |
199
- find nuttx/boards -name defconfig | xargs sed -i '$a\${{ env.WAMR_COMMON_OPTION }}'
218
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR
219
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_LOG
220
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN
221
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_REF_TYPES
222
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_ENABLE_SPEC_TEST
223
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_SHARED_MEMORY
224
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_BULK_MEMORY
225
+ kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_STACK_GUARD_SIZE 1024
226
+ kconfig-tweak --enable CONFIG_FS_HOSTFS
227
+ kconfig-tweak --enable CONFIG_ARM_SEMIHOSTING_HOSTFS
228
+ kconfig-tweak --enable CONFIG_ARM_SEMIHOSTING_HOSTFS_CACHE_COHERENCE
229
+ kconfig-tweak --enable CONFIG_RISCV_SEMIHOSTING_HOSTFS
230
+ kconfig-tweak --enable CONFIG_RISCV_SEMIHOSTING_HOSTFS_CACHE_COHERENCE
231
+ kconfig-tweak --enable CONFIG_XTENSA_SEMIHOSTING_HOSTFS
232
+ kconfig-tweak --enable CONFIG_XTENSA_SEMIHOSTING_HOSTFS_CACHE_COHERENCE
233
+ kconfig-tweak --enable CONFIG_EOL_IS_LF
234
+ kconfig-tweak --enable CONFIG_LIBC_FLOATINGPOINT
235
+ kconfig-tweak --set-val CONFIG_NSH_LINELEN 255
236
+ working-directory : nuttx
200
237
201
238
- name : Set WAMR stack size for NuttX
202
239
if : matrix.target_config.target != 'xtensa'
203
240
run : |
204
- find nuttx/boards -name defconfig | xargs sed -i '$aCONFIG_INTERPRETERS_WAMR_STACKSIZE=327680\n'
241
+ kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_STACKSIZE 327680
242
+ working-directory : nuttx
205
243
206
244
# because qemu doesn't have a proper emulation of esp32s3 psram,
207
245
# we are limited to the internal ram, which is about 400KB.
208
246
- name : Set WAMR stack size for NuttX (xtensa)
209
247
if : matrix.target_config.target == 'xtensa'
210
248
run : |
211
- find nuttx/boards -name defconfig | xargs sed -i '$aCONFIG_INTERPRETERS_WAMR_STACKSIZE=25600\n'
212
-
213
- # Note: the nuttx config we happened to use for xtensa already has
214
- # hostfs enabled.
215
- - name : Enable hostfs for NuttX
216
- if : matrix.target_config.target != 'xtensa'
217
- run : |
218
- find nuttx/boards -name defconfig | xargs sed -i '$a\${{ env.HOSTFS_OPTION }}'
249
+ kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_STACKSIZE 25600
250
+ working-directory : nuttx
219
251
220
- - name : Enable WAMR Interpreter for NuttX
252
+ - name : Enable WAMR interpreter/aot runtime for NuttX
253
+ if : matrix.wamr_test_option.option != ''
221
254
run : |
222
- find nuttx/boards -name defconfig | xargs sed -i '$a\${{ matrix.wamr_test_option.option }}'
255
+ for x in ${{ matrix.wamr_test_option.option }}; do
256
+ kconfig-tweak --enable $x
257
+ done
258
+ working-directory : nuttx
223
259
224
- - name : Enable WAMR Feature for NuttX
260
+ - name : Enable WAMR Features for NuttX
225
261
if : matrix.wamr_feature_option.option != ''
226
262
run : |
227
- find nuttx/boards -name defconfig | xargs sed -i '$a\${{ matrix.wamr_feature_option.option }}'
263
+ for x in ${{ matrix.wamr_feature_option.option }}; do
264
+ kconfig-tweak --enable $x
265
+ done
266
+ working-directory : nuttx
228
267
229
268
- name : Disable FPU for NuttX
230
269
if : matrix.target_config.fpu_type == 'none'
231
270
run : |
232
- find nuttx/boards -name defconfig | xargs sed -i '$a\# CONFIG_ARCH_FPU is not set\n'
271
+ kconfig-tweak --disable CONFIG_ARCH_FPU
272
+ working-directory : nuttx
233
273
234
274
- name : Disable DPFPU for NuttX
235
275
if : matrix.target_config.fpu_type == 'fp'
236
276
run : |
237
- find nuttx/boards -name defconfig | xargs sed -i '$a\# CONFIG_ARCH_DPFPU is not set\n'
277
+ kconfig-tweak --disable CONFIG_ARCH_DPFPU
278
+ working-directory : nuttx
238
279
239
280
# Note: while a real hardware would need
240
281
# INTERPRETERS_WAMR_MEM_DUAL_BUS_MIRROR=y,
@@ -245,34 +286,8 @@ jobs:
245
286
- name : Tweak NuttX config (xtensa)
246
287
if : matrix.target_config.target == 'xtensa'
247
288
run : |
248
- find nuttx/boards -name defconfig | xargs sed -i '$aCONFIG_INTERPRETERS_WAMR_AOT_WORD_ALIGN_READ=y\n\# CONFIG_INTERPRETERS_WAMR_MEM_DUAL_BUS_MIRROR is not set\n'
249
-
250
- - name : Build wamrc
251
- if : contains(matrix.wamr_test_option.mode, 'aot')
252
- working-directory : apps/interpreters/wamr/wamr/wamr-compiler
253
- run : |
254
- cmake -Bbuild .
255
- cmake --build build
256
-
257
- # the nuttx version we use for xtensa requires esptool.py newer than
258
- # what we have in our version of the apache-nuttx-ci-linux image.
259
- - name : Install the latest esptool.py (xtensa)
260
- if : matrix.target_config.target == 'xtensa'
261
- run : |
262
- pip3 install esptool==4.7.0
263
- esptool.py version
264
-
265
- - name : Configure NuttX
266
- run : |
267
- tools/configure.sh ${{ matrix.target_config.config }}
268
- working-directory : nuttx
269
-
270
- # depending on configurations, the iwasm command line generated
271
- # by spec-test-script can be longer than the default NSH_LINELEN,
272
- # which is 64 or 80.
273
- - name : Tweak NuttX config
274
- run : |
275
- kconfig-tweak --set-val CONFIG_NSH_LINELEN 255
289
+ kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR_AOT_WORD_ALIGN_READ
290
+ kconfig-tweak --disable CONFIG_INTERPRETERS_WAMR_MEM_DUAL_BUS_MIRROR
276
291
working-directory : nuttx
277
292
278
293
- name : Build NuttX
0 commit comments