CI: Unify configuration stage for NuttX (#3725)

This commit is contained in:
Huang Qi 2024-08-19 10:35:18 +08:00 committed by GitHub
parent 67c33a29e3
commit 88caa0c53a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,18 +68,17 @@ jobs:
# arm64 # arm64
"boards/arm64/qemu/qemu-armv8a/configs/nsh", "boards/arm64/qemu/qemu-armv8a/configs/nsh",
] ]
wamr_config_option: [
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\n", wamr_config_option:
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_WASI=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n", - "CONFIG_INTERPRETERS_WAMR_FAST"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n", - "CONFIG_INTERPRETERS_WAMR_CLASSIC"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_WASI=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_FAST"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_FAST CONFIG_INTERPRETERS_WAMR_LIBC_WASI"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_FAST CONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_CLASSIC"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_CLASSIC CONFIG_INTERPRETERS_WAMR_LIBC_WASI"
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n", - "CONFIG_INTERPRETERS_WAMR_AOT CONFIG_INTERPRETERS_WAMR_CLASSIC CONFIG_INTERPRETERS_WAMR_LIBC_WASI"
]
steps: steps:
- name: Checkout NuttX - name: Checkout NuttX
@ -102,16 +101,22 @@ jobs:
repository: ${{ github.repository }} repository: ${{ github.repository }}
path: apps/interpreters/wamr/wamr path: apps/interpreters/wamr/wamr
- name: Enable WAMR for NuttX - name: Configure WAMR
working-directory: nuttx
run: | run: |
find nuttx/boards -name defconfig | xargs sed -i '$a\CONFIG_EOL_IS_LF=y\n${{ matrix.wamr_config_option }}' tools/configure.sh ${{ matrix.nuttx_board_config }}
find nuttx/boards/sim -name defconfig | xargs sed -i '$a\CONFIG_LIBM=y\n' kconfig-tweak --enable CONFIG_PSEUDOFS_SOFTLINKS
kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR
kconfig-tweak --enable CONFIG_INTERPRETERS_IWASM_TASK
kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_PRIORITY 100
kconfig-tweak --set-val CONFIG_INTERPRETERS_WAMR_STACKSIZE 8192
for x in ${{ matrix.wamr_config_option }}; do
kconfig-tweak --enable $x
done
- name: Build - name: Build
run: | working-directory: nuttx
cd nuttx run: make -j$(nproc) EXTRAFLAGS=-Werror
tools/configure.sh ${{ matrix.nuttx_board_config }}
make -j$(nproc) EXTRAFLAGS=-Werror
- name: Checkout Bloaty - name: Checkout Bloaty
uses: actions/checkout@v3 uses: actions/checkout@v3