From b7b50d8add6157419ef381f3635d002ea807b636 Mon Sep 17 00:00:00 2001 From: TianlongLiang Date: Tue, 28 Apr 2026 17:49:42 +0800 Subject: [PATCH 1/6] Add unified QEMU runner with output verification in CI --- .github/scripts/run_qemu_and_verify.sh | 83 +++++++++++++++++++++ .github/scripts/run_qemu_arc.sh | 46 ------------ .github/workflows/compilation_on_zephyr.yml | 68 +++++++++++------ 3 files changed, 127 insertions(+), 70 deletions(-) create mode 100755 .github/scripts/run_qemu_and_verify.sh delete mode 100755 .github/scripts/run_qemu_arc.sh diff --git a/.github/scripts/run_qemu_and_verify.sh b/.github/scripts/run_qemu_and_verify.sh new file mode 100755 index 0000000000..ed14b1dfea --- /dev/null +++ b/.github/scripts/run_qemu_and_verify.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# Unified QEMU runner for Zephyr CI. +# Extracts the QEMU command from build.ninja, runs it with a timeout, +# and verifies expected strings appear in the output. +# +# Usage: run_qemu_and_verify.sh [expected_string ...] + +set -euo pipefail + +if [ "$#" -lt 3 ]; then + echo "Usage: $0 [expected_string ...]" + exit 1 +fi + +BUILD_DIR="$1" +TIMEOUT_SECONDS="$2" +shift 2 +EXPECTED_STRINGS=("$@") + +NINJA_FILE="$BUILD_DIR/build.ninja" +if [ ! -f "$NINJA_FILE" ]; then + echo "Error: build.ninja not found at $NINJA_FILE" + exit 1 +fi + +# Extract the QEMU command from build.ninja. +# The run_qemu target has a COMMAND line like: +# COMMAND = cd /path/to/build && /path/to/qemu-system-xxx -kernel +QEMU_CMD=$(awk ' + /^build zephyr\/CMakeFiles\/run_qemu /{found=1} + found && /^ COMMAND = /{ + sub(/^ COMMAND = /, "") + print + exit + } +' "$NINJA_FILE") + +if [ -z "$QEMU_CMD" ]; then + echo "Error: could not extract QEMU command from $NINJA_FILE" + exit 1 +fi + +echo "=== Extracted QEMU command ===" +echo "$QEMU_CMD" +echo "=== Running with ${TIMEOUT_SECONDS}s timeout ===" + +LOG_FILE=$(mktemp /tmp/qemu_output.XXXXXX) +trap "rm -f $LOG_FILE" EXIT + +# Run QEMU with timeout. Exit code 124 means timeout — that's expected since +# Zephyr doesn't shut down the emulator. Any other non-zero exit is also fine +# for some boards (e.g., x86 with isa-debug-exit returns 1). +set +e +eval "timeout ${TIMEOUT_SECONDS}s ${QEMU_CMD}" > "$LOG_FILE" 2>&1 +QEMU_EXIT=$? +set -e + +echo "=== QEMU exited with code $QEMU_EXIT ===" + +# Verify expected strings +FAILED=0 +for expected in "${EXPECTED_STRINGS[@]}"; do + if grep -qF "$expected" "$LOG_FILE"; then + echo "PASS: found '$expected'" + else + echo "FAIL: missing '$expected'" + FAILED=1 + fi +done + +if [ "$FAILED" -ne 0 ]; then + echo "" + echo "=== Full QEMU output ===" + cat "$LOG_FILE" + echo "=== End of QEMU output ===" + exit 1 +fi + +echo "=== All expected strings found ===" diff --git a/.github/scripts/run_qemu_arc.sh b/.github/scripts/run_qemu_arc.sh deleted file mode 100755 index ab226521b2..0000000000 --- a/.github/scripts/run_qemu_arc.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# THIS SCRIPT IS USED TO RUN QEMU ARC EMULATOR DIRECTLY ON CI ONLY. -# USUALLY, you SHOULD NOT RUN IT ON YOUR LOCAL MACHINE. -# INSTEAD, YOU SHOULD USE `west build -t run` COMMAND. - -# Two arguments. first is the path to the zephyr-sdk, second is the path to the zephyr elf. -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " - exit 1 -fi - -ZEPHYR_SDK_PATH=$1 -ZEPHYR_ELF_PATH=$2 - -if [ ! -d "$ZEPHYR_SDK_PATH" ]; then - echo "Error: Zephyr SDK path does not exist: $ZEPHYR_SDK_PATH" - exit 1 -fi -if [ ! -f "$ZEPHYR_ELF_PATH" ]; then - echo "Error: Zephyr ELF file does not exist: $ZEPHYR_ELF_PATH" - exit 1 -fi - -# this command is copied from the content of build.ninja which is generated by west build. -# please do not modify it unless synchronizing with the build.ninja file. -$ZEPHYR_SDK_PATH/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-arc \ - -cpu arcem -m 8M \ - -nographic -no-reboot -monitor none \ - -global cpu.firq=false \ - -global cpu.num-irqlevels=15 \ - -global cpu.num-irq=25 \ - -global cpu.ext-irq=20 \ - -global cpu.freq_hz=10000000 \ - -global cpu.timer0=true \ - -global cpu.timer1=true \ - -global cpu.has-mpu=true \ - -global cpu.mpu-numreg=16 \ - -net none \ - -pidfile qemu.pid \ - -chardev stdio,id=con,mux=on \ - -serial chardev:con \ - -mon chardev=con,mode=readline \ - -icount shift=6,align=off,sleep=off \ - -rtc clock=vm \ - -kernel $ZEPHYR_ELF_PATH diff --git a/.github/workflows/compilation_on_zephyr.yml b/.github/workflows/compilation_on_zephyr.yml index a98b9a28dd..117713f7f9 100644 --- a/.github/workflows/compilation_on_zephyr.yml +++ b/.github/workflows/compilation_on_zephyr.yml @@ -94,50 +94,70 @@ jobs: app-path: application manifest-file-name: west_lite.yml sdk-version: ${{ env.ZEPHYR_SDK_VERSION }} - toolchains: arc-zephyr-elf:arc64-zephyr-elf + toolchains: arc-zephyr-elf:arc64-zephyr-elf:x86_64-zephyr-elf - - name: Build a sample application(simple) + - name: Build and run simple sample (ARC) shell: bash run: | pushd product-mini/platforms/zephyr/simple - west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC + west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC popd - # west build -t run will fork several processes, which will cause the job to hang. - # run in the background and kill it after 5 seconds - .github/scripts/run_qemu_arc.sh \ - ../../zephyr-sdk \ - product-mini/platforms/zephyr/simple/build/zephyr/zephyr.elf & - sleep 5 - pkill qemu-system-arc + .github/scripts/run_qemu_and_verify.sh \ + product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed:" working-directory: modules/wasm-micro-runtime - - name: Build a sample application(user-mode) + - name: Build and run user-mode sample (ARC) shell: bash run: | pushd product-mini/platforms/zephyr/user-mode west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC popd - # west build -t run will fork several processes, which will cause the job to hang. - # run in the background and kill it after 5 seconds - .github/scripts/run_qemu_arc.sh \ - ../../zephyr-sdk \ - product-mini/platforms/zephyr/user-mode/build/zephyr/zephyr.elf & - sleep 5 - pkill qemu-system-arc + .github/scripts/run_qemu_and_verify.sh \ + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" working-directory: modules/wasm-micro-runtime - - name: Build a sample application(user-mode, prebuilt library approach) + - name: Build and run user-mode sample with prebuilt library (ARC) shell: bash run: | pushd product-mini/platforms/zephyr/user-mode west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC -DWAMR_USE_PREBUILT_LIB=1 popd - .github/scripts/run_qemu_arc.sh \ - ../../zephyr-sdk \ - product-mini/platforms/zephyr/user-mode/build/zephyr/zephyr.elf & - sleep 5 - pkill qemu-system-arc + .github/scripts/run_qemu_and_verify.sh \ + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" + working-directory: modules/wasm-micro-runtime + + - name: Build and run simple sample (x86-32) + shell: bash + run: | + pushd product-mini/platforms/zephyr/simple + west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 + popd + + .github/scripts/run_qemu_and_verify.sh \ + product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed:" + working-directory: modules/wasm-micro-runtime + + - name: Build and run user-mode sample (x86-32) + shell: bash + run: | + pushd product-mini/platforms/zephyr/user-mode + west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 + popd + + .github/scripts/run_qemu_and_verify.sh \ + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" + working-directory: modules/wasm-micro-runtime + + - name: Build and run user-mode sample with prebuilt library (x86-32) + shell: bash + run: | + pushd product-mini/platforms/zephyr/user-mode + west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 -DWAMR_USE_PREBUILT_LIB=1 + popd + + .github/scripts/run_qemu_and_verify.sh \ + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" working-directory: modules/wasm-micro-runtime From ed627caec95c2721ee6cb383b719afabdf35230b Mon Sep 17 00:00:00 2001 From: TianlongLiang Date: Wed, 29 Apr 2026 09:27:48 +0800 Subject: [PATCH 2/6] some update --- .github/scripts/run_qemu_and_verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/run_qemu_and_verify.sh b/.github/scripts/run_qemu_and_verify.sh index ed14b1dfea..4573080648 100755 --- a/.github/scripts/run_qemu_and_verify.sh +++ b/.github/scripts/run_qemu_and_verify.sh @@ -55,7 +55,7 @@ trap "rm -f $LOG_FILE" EXIT # Zephyr doesn't shut down the emulator. Any other non-zero exit is also fine # for some boards (e.g., x86 with isa-debug-exit returns 1). set +e -eval "timeout ${TIMEOUT_SECONDS}s ${QEMU_CMD}" > "$LOG_FILE" 2>&1 +timeout "${TIMEOUT_SECONDS}s" bash -c "${QEMU_CMD}" > "$LOG_FILE" 2>&1 QEMU_EXIT=$? set -e From 789ac1ad9cba846134bd01e054165d26f2232d85 Mon Sep 17 00:00:00 2001 From: TianlongLiang Date: Wed, 29 Apr 2026 13:38:51 +0800 Subject: [PATCH 3/6] some update --- .github/workflows/compilation_on_zephyr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compilation_on_zephyr.yml b/.github/workflows/compilation_on_zephyr.yml index 117713f7f9..b190f235b7 100644 --- a/.github/workflows/compilation_on_zephyr.yml +++ b/.github/workflows/compilation_on_zephyr.yml @@ -104,7 +104,7 @@ jobs: popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed:" + product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed" working-directory: modules/wasm-micro-runtime - name: Build and run user-mode sample (ARC) @@ -115,7 +115,7 @@ jobs: popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" working-directory: modules/wasm-micro-runtime - name: Build and run user-mode sample with prebuilt library (ARC) @@ -126,7 +126,7 @@ jobs: popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" working-directory: modules/wasm-micro-runtime - name: Build and run simple sample (x86-32) @@ -137,7 +137,7 @@ jobs: popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed:" + product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed" working-directory: modules/wasm-micro-runtime - name: Build and run user-mode sample (x86-32) @@ -148,7 +148,7 @@ jobs: popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" working-directory: modules/wasm-micro-runtime - name: Build and run user-mode sample with prebuilt library (x86-32) @@ -159,5 +159,5 @@ jobs: popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed:" + product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" working-directory: modules/wasm-micro-runtime From c626b86e4ab04c55466aa9e698fcbc8aea3a72ea Mon Sep 17 00:00:00 2001 From: TianlongLiang Date: Wed, 29 Apr 2026 13:48:22 +0800 Subject: [PATCH 4/6] refactor CI compile&run logic --- .github/workflows/compilation_on_zephyr.yml | 94 ++++++++------------- 1 file changed, 34 insertions(+), 60 deletions(-) diff --git a/.github/workflows/compilation_on_zephyr.yml b/.github/workflows/compilation_on_zephyr.yml index b190f235b7..26abb90106 100644 --- a/.github/workflows/compilation_on_zephyr.yml +++ b/.github/workflows/compilation_on_zephyr.yml @@ -57,6 +57,34 @@ permissions: jobs: smoke_test: runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + # -- Architecture -- + arch: + - name: ARC + board: qemu_arc/qemu_arc_hs + target: ARC + toolchains: arc-zephyr-elf:arc64-zephyr-elf + - name: x86-32 + board: qemu_x86 + target: X86_32 + toolchains: x86_64-zephyr-elf + # -- Sample variant -- + sample: + - name: simple + path: simple + extra_cmake: "" + verify: '"Hello world!" "elapsed"' + - name: user-mode + path: user-mode + extra_cmake: "" + verify: '"Hello world!" "elapsed"' + - name: user-mode prebuilt + path: user-mode + extra_cmake: "-DWAMR_USE_PREBUILT_LIB=1" + verify: '"Hello world!" "elapsed"' + name: ${{ matrix.sample.name }} (${{ matrix.arch.name }}) container: # For Zephyr 3.7 LTS, use the v0.26-branch or the latest v0.26.x release Docker image. # ci require a larger runner to avoid "no space left on device" @@ -94,70 +122,16 @@ jobs: app-path: application manifest-file-name: west_lite.yml sdk-version: ${{ env.ZEPHYR_SDK_VERSION }} - toolchains: arc-zephyr-elf:arc64-zephyr-elf:x86_64-zephyr-elf + toolchains: ${{ matrix.arch.toolchains }} - - name: Build and run simple sample (ARC) + - name: Build and run shell: bash run: | - pushd product-mini/platforms/zephyr/simple - west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC + pushd product-mini/platforms/zephyr/${{ matrix.sample.path }} + west build . -b ${{ matrix.arch.board }} -p always -- \ + -DWAMR_BUILD_TARGET=${{ matrix.arch.target }} ${{ matrix.sample.extra_cmake }} popd .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed" - working-directory: modules/wasm-micro-runtime - - - name: Build and run user-mode sample (ARC) - shell: bash - run: | - pushd product-mini/platforms/zephyr/user-mode - west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC - popd - - .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" - working-directory: modules/wasm-micro-runtime - - - name: Build and run user-mode sample with prebuilt library (ARC) - shell: bash - run: | - pushd product-mini/platforms/zephyr/user-mode - west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC -DWAMR_USE_PREBUILT_LIB=1 - popd - - .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" - working-directory: modules/wasm-micro-runtime - - - name: Build and run simple sample (x86-32) - shell: bash - run: | - pushd product-mini/platforms/zephyr/simple - west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 - popd - - .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/simple/build 10 "Hello world!" "elapsed" - working-directory: modules/wasm-micro-runtime - - - name: Build and run user-mode sample (x86-32) - shell: bash - run: | - pushd product-mini/platforms/zephyr/user-mode - west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 - popd - - .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" - working-directory: modules/wasm-micro-runtime - - - name: Build and run user-mode sample with prebuilt library (x86-32) - shell: bash - run: | - pushd product-mini/platforms/zephyr/user-mode - west build . -b qemu_x86 -p always -- -DWAMR_BUILD_TARGET=X86_32 -DWAMR_USE_PREBUILT_LIB=1 - popd - - .github/scripts/run_qemu_and_verify.sh \ - product-mini/platforms/zephyr/user-mode/build 10 "Hello world!" "elapsed" + product-mini/platforms/zephyr/${{ matrix.sample.path }}/build 10 ${{ matrix.sample.verify }} working-directory: modules/wasm-micro-runtime From 7ac829e9b1c74e918199e8b7caf208391548ac01 Mon Sep 17 00:00:00 2001 From: TianlongLiang Date: Thu, 30 Apr 2026 13:40:07 +0800 Subject: [PATCH 5/6] use west instead of qemu command to run, suppress Zephyr internal warning --- .github/scripts/run_qemu_and_verify.sh | 40 +++++-------------- .../platforms/zephyr/simple/CMakeLists.txt | 5 +++ .../user-mode/lib-wamr-zephyr/CMakeLists.txt | 6 +++ 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/.github/scripts/run_qemu_and_verify.sh b/.github/scripts/run_qemu_and_verify.sh index 4573080648..87b1e7f6a5 100755 --- a/.github/scripts/run_qemu_and_verify.sh +++ b/.github/scripts/run_qemu_and_verify.sh @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Unified QEMU runner for Zephyr CI. -# Extracts the QEMU command from build.ninja, runs it with a timeout, +# Uses `west build -t run` to launch the emulator with a timeout, # and verifies expected strings appear in the output. # # Usage: run_qemu_and_verify.sh [expected_string ...] @@ -21,45 +21,25 @@ TIMEOUT_SECONDS="$2" shift 2 EXPECTED_STRINGS=("$@") -NINJA_FILE="$BUILD_DIR/build.ninja" -if [ ! -f "$NINJA_FILE" ]; then - echo "Error: build.ninja not found at $NINJA_FILE" +if [ ! -d "$BUILD_DIR" ]; then + echo "Error: build directory not found at $BUILD_DIR" exit 1 fi -# Extract the QEMU command from build.ninja. -# The run_qemu target has a COMMAND line like: -# COMMAND = cd /path/to/build && /path/to/qemu-system-xxx -kernel -QEMU_CMD=$(awk ' - /^build zephyr\/CMakeFiles\/run_qemu /{found=1} - found && /^ COMMAND = /{ - sub(/^ COMMAND = /, "") - print - exit - } -' "$NINJA_FILE") - -if [ -z "$QEMU_CMD" ]; then - echo "Error: could not extract QEMU command from $NINJA_FILE" - exit 1 -fi - -echo "=== Extracted QEMU command ===" -echo "$QEMU_CMD" -echo "=== Running with ${TIMEOUT_SECONDS}s timeout ===" +echo "=== Running 'west build -t run' with ${TIMEOUT_SECONDS}s timeout ===" LOG_FILE=$(mktemp /tmp/qemu_output.XXXXXX) trap "rm -f $LOG_FILE" EXIT -# Run QEMU with timeout. Exit code 124 means timeout — that's expected since +# Run the emulator via west. Exit code 124 means timeout — that's expected since # Zephyr doesn't shut down the emulator. Any other non-zero exit is also fine # for some boards (e.g., x86 with isa-debug-exit returns 1). set +e -timeout "${TIMEOUT_SECONDS}s" bash -c "${QEMU_CMD}" > "$LOG_FILE" 2>&1 -QEMU_EXIT=$? +timeout "${TIMEOUT_SECONDS}s" west build -t run --build-dir "$BUILD_DIR" > "$LOG_FILE" 2>&1 +WEST_EXIT=$? set -e -echo "=== QEMU exited with code $QEMU_EXIT ===" +echo "=== west exited with code $WEST_EXIT ===" # Verify expected strings FAILED=0 @@ -74,9 +54,9 @@ done if [ "$FAILED" -ne 0 ]; then echo "" - echo "=== Full QEMU output ===" + echo "=== Full output ===" cat "$LOG_FILE" - echo "=== End of QEMU output ===" + echo "=== End of output ===" exit 1 fi diff --git a/product-mini/platforms/zephyr/simple/CMakeLists.txt b/product-mini/platforms/zephyr/simple/CMakeLists.txt index 46dc3ea0c5..1020a20049 100644 --- a/product-mini/platforms/zephyr/simple/CMakeLists.txt +++ b/product-mini/platforms/zephyr/simple/CMakeLists.txt @@ -59,3 +59,8 @@ target_sources(app PRIVATE ${WAMR_RUNTIME_LIB_SOURCE} src/main.c) +# Suppress -Wtype-limits warnings originating from Zephyr's own headers +# (e.g. net_if.h "comparison is always true due to limited range of data type"). +# Pulled in transitively via platform_internal.h → net_pkt.h → net_if.h. +target_compile_options(app PRIVATE -Wno-type-limits) + diff --git a/product-mini/platforms/zephyr/user-mode/lib-wamr-zephyr/CMakeLists.txt b/product-mini/platforms/zephyr/user-mode/lib-wamr-zephyr/CMakeLists.txt index 9fb31fb7ff..9e363ae6ec 100644 --- a/product-mini/platforms/zephyr/user-mode/lib-wamr-zephyr/CMakeLists.txt +++ b/product-mini/platforms/zephyr/user-mode/lib-wamr-zephyr/CMakeLists.txt @@ -57,6 +57,12 @@ zephyr_library_sources ( wamr_lib.c ) +# Suppress -Wtype-limits warnings originating from Zephyr's own headers +# (e.g. net_if.h:861 "comparison is always true due to limited range of data type"). +# These are pulled in transitively via platform_internal.h → net_pkt.h → net_if.h +# and cannot be fixed in WAMR source code. +zephyr_library_compile_options(-Wno-type-limits) + # Ensure generated headers (e.g. heap_constants.h) are ready before compiling # the library. Zephyr adds this dependency for its own libraries automatically, # but parallel builds can race when the library is added via add_subdirectory. From 385d007c39c04ed9439f31d1faa622daa3f4560f Mon Sep 17 00:00:00 2001 From: TianlongLiang Date: Thu, 30 Apr 2026 13:56:22 +0800 Subject: [PATCH 6/6] print west run output in CI too --- .github/scripts/run_qemu_and_verify.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/run_qemu_and_verify.sh b/.github/scripts/run_qemu_and_verify.sh index 87b1e7f6a5..772da82e17 100755 --- a/.github/scripts/run_qemu_and_verify.sh +++ b/.github/scripts/run_qemu_and_verify.sh @@ -35,8 +35,8 @@ trap "rm -f $LOG_FILE" EXIT # Zephyr doesn't shut down the emulator. Any other non-zero exit is also fine # for some boards (e.g., x86 with isa-debug-exit returns 1). set +e -timeout "${TIMEOUT_SECONDS}s" west build -t run --build-dir "$BUILD_DIR" > "$LOG_FILE" 2>&1 -WEST_EXIT=$? +timeout "${TIMEOUT_SECONDS}s" west build -t run --build-dir "$BUILD_DIR" 2>&1 | tee "$LOG_FILE" +WEST_EXIT=${PIPESTATUS[0]} set -e echo "=== west exited with code $WEST_EXIT ==="