Skip to content

Commit 88caa0c

Browse files
authored
CI: Unify configuration stage for NuttX (#3725)
1 parent 67c33a2 commit 88caa0c

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

.github/workflows/compilation_on_nuttx.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,17 @@ jobs:
6868
# arm64
6969
"boards/arm64/qemu/qemu-armv8a/configs/nsh",
7070
]
71-
wamr_config_option: [
72-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\n",
73-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_WASI=y\\n",
74-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n",
75-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n",
76-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_WASI=y\\n",
77-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n",
78-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n",
79-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\n",
80-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\n",
81-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n",
82-
]
71+
72+
wamr_config_option:
73+
- "CONFIG_INTERPRETERS_WAMR_AOT"
74+
- "CONFIG_INTERPRETERS_WAMR_FAST"
75+
- "CONFIG_INTERPRETERS_WAMR_CLASSIC"
76+
- "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_FAST"
77+
- "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_FAST CONFIG_INTERPRETERS_WAMR_LIBC_WASI"
78+
- "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_FAST CONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN"
79+
- "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_CLASSIC"
80+
- "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_CLASSIC CONFIG_INTERPRETERS_WAMR_LIBC_WASI"
81+
- "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_CLASSIC CONFIG_INTERPRETERS_WAMR_LIBC_WASI"
8382

8483
steps:
8584
- name: Checkout NuttX
@@ -102,16 +101,22 @@ jobs:
102101
repository: ${{ github.repository }}
103102
path: apps/interpreters/wamr/wamr
104103

105-
- name: Enable WAMR for NuttX
104+
- name: Configure WAMR
105+
working-directory: nuttx
106106
run: |
107-
find nuttx/boards -name defconfig | xargs sed -i '$a\CONFIG_EOL_IS_LF=y\n${{ matrix.wamr_config_option }}'
108-
find nuttx/boards/sim -name defconfig | xargs sed -i '$a\CONFIG_LIBM=y\n'
107+
tools/configure.sh ${{ matrix.nuttx_board_config }}
108+
kconfig-tweak --enable CONFIG_PSEUDOFS_SOFTLINKS
109+
kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR
110+
kconfig-tweak --enable CONFIG_INTERPRETERS_IWASM_TASK
111+
kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_PRIORITY 100
112+
kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_STACKSIZE 8192
113+
for x in ${{ matrix.wamr_config_option }}; do
114+
kconfig-tweak --enable $x
115+
done
109116
110117
- name: Build
111-
run: |
112-
cd nuttx
113-
tools/configure.sh ${{ matrix.nuttx_board_config }}
114-
make -j$(nproc) EXTRAFLAGS=-Werror
118+
working-directory: nuttx
119+
run: make -j$(nproc) EXTRAFLAGS=-Werror
115120

116121
- name: Checkout Bloaty
117122
uses: actions/checkout@v3

0 commit comments

Comments
 (0)