mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-07 02:11:06 +00:00
Add smoke tests for iwasm and wamrc binaries to validate build output (#4455)
This commit is contained in:
parent
29d465b44e
commit
e40b05a5c6
130
.github/workflows/build_iwasm_release.yml
vendored
130
.github/workflows/build_iwasm_release.yml
vendored
|
@ -32,60 +32,60 @@ on:
|
|||
required: false
|
||||
|
||||
env:
|
||||
DEFAULT_BUILD_OPTIONS:
|
||||
DEFAULT_BUILD_OPTIONS:
|
||||
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \
|
||||
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
|
||||
-DWAMR_BUILD_DEBUG_INTERP=0 \
|
||||
-DWAMR_BUILD_DEBUG_AOT=0 \
|
||||
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
|
||||
-DWAMR_BUILD_LIBC_UVWASI=0 \
|
||||
-DWAMR_BUILD_LIBC_EMCC=0 \
|
||||
-DWAMR_BUILD_LIB_RATS=0 \
|
||||
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
|
||||
-DWAMR_BUILD_MEMORY_PROFILING=0 \
|
||||
-DWAMR_BUILD_MINI_LOADER=0 \
|
||||
-DWAMR_BUILD_MULTI_MODULE=0 \
|
||||
-DWAMR_BUILD_PERF_PROFILING=0 \
|
||||
-DWAMR_BUILD_SPEC_TEST=0 \
|
||||
-DWAMR_BUILD_BULK_MEMORY=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
|
||||
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
-DWAMR_BUILD_REF_TYPES=1 \
|
||||
-DWAMR_BUILD_SIMD=1 \
|
||||
-DWAMR_BUILD_SHARED_MEMORY=1 \
|
||||
-DWAMR_BUILD_TAIL_CALL=1 \
|
||||
-DWAMR_BUILD_THREAD_MGR=1"
|
||||
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
|
||||
-DWAMR_BUILD_DEBUG_INTERP=0 \
|
||||
-DWAMR_BUILD_DEBUG_AOT=0 \
|
||||
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
|
||||
-DWAMR_BUILD_LIBC_UVWASI=0 \
|
||||
-DWAMR_BUILD_LIBC_EMCC=0 \
|
||||
-DWAMR_BUILD_LIB_RATS=0 \
|
||||
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
|
||||
-DWAMR_BUILD_MEMORY_PROFILING=0 \
|
||||
-DWAMR_BUILD_MINI_LOADER=0 \
|
||||
-DWAMR_BUILD_MULTI_MODULE=0 \
|
||||
-DWAMR_BUILD_PERF_PROFILING=0 \
|
||||
-DWAMR_BUILD_SPEC_TEST=0 \
|
||||
-DWAMR_BUILD_BULK_MEMORY=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
|
||||
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
-DWAMR_BUILD_REF_TYPES=1 \
|
||||
-DWAMR_BUILD_SIMD=1 \
|
||||
-DWAMR_BUILD_SHARED_MEMORY=1 \
|
||||
-DWAMR_BUILD_TAIL_CALL=1 \
|
||||
-DWAMR_BUILD_THREAD_MGR=1"
|
||||
GC_EH_BUILD_OPTIONS:
|
||||
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 \
|
||||
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
|
||||
-DWAMR_BUILD_DEBUG_INTERP=0 \
|
||||
-DWAMR_BUILD_DEBUG_AOT=0 \
|
||||
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
|
||||
-DWAMR_BUILD_LIBC_UVWASI=0 \
|
||||
-DWAMR_BUILD_LIBC_EMCC=0 \
|
||||
-DWAMR_BUILD_LIB_RATS=0 \
|
||||
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
|
||||
-DWAMR_BUILD_MEMORY_PROFILING=0 \
|
||||
-DWAMR_BUILD_MINI_LOADER=0 \
|
||||
-DWAMR_BUILD_MULTI_MODULE=0 \
|
||||
-DWAMR_BUILD_PERF_PROFILING=0 \
|
||||
-DWAMR_BUILD_SPEC_TEST=0 \
|
||||
-DWAMR_BUILD_BULK_MEMORY=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
|
||||
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
-DWAMR_BUILD_REF_TYPES=1 \
|
||||
-DWAMR_BUILD_SIMD=1 \
|
||||
-DWAMR_BUILD_SHARED_MEMORY=1 \
|
||||
-DWAMR_BUILD_TAIL_CALL=1 \
|
||||
-DWAMR_BUILD_THREAD_MGR=1 \
|
||||
-DWAMR_BUILD_EXCE_HANDLING=1 \
|
||||
-DWAMR_BUILD_GC=1"
|
||||
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
|
||||
-DWAMR_BUILD_DEBUG_INTERP=0 \
|
||||
-DWAMR_BUILD_DEBUG_AOT=0 \
|
||||
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
|
||||
-DWAMR_BUILD_LIBC_UVWASI=0 \
|
||||
-DWAMR_BUILD_LIBC_EMCC=0 \
|
||||
-DWAMR_BUILD_LIB_RATS=0 \
|
||||
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
|
||||
-DWAMR_BUILD_MEMORY_PROFILING=0 \
|
||||
-DWAMR_BUILD_MINI_LOADER=0 \
|
||||
-DWAMR_BUILD_MULTI_MODULE=0 \
|
||||
-DWAMR_BUILD_PERF_PROFILING=0 \
|
||||
-DWAMR_BUILD_SPEC_TEST=0 \
|
||||
-DWAMR_BUILD_BULK_MEMORY=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD=1 \
|
||||
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
|
||||
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
-DWAMR_BUILD_REF_TYPES=1 \
|
||||
-DWAMR_BUILD_SIMD=1 \
|
||||
-DWAMR_BUILD_SHARED_MEMORY=1 \
|
||||
-DWAMR_BUILD_TAIL_CALL=1 \
|
||||
-DWAMR_BUILD_THREAD_MGR=1 \
|
||||
-DWAMR_BUILD_EXCE_HANDLING=1 \
|
||||
-DWAMR_BUILD_GC=1"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -97,9 +97,9 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- build_options: $DEFAULT_BUILD_OPTIONS
|
||||
suffix: ''
|
||||
suffix: ""
|
||||
- build_options: $GC_EH_BUILD_OPTIONS
|
||||
suffix: '-gc-eh'
|
||||
suffix: "-gc-eh"
|
||||
permissions:
|
||||
contents: write # for uploading release artifacts
|
||||
|
||||
|
@ -126,6 +126,30 @@ jobs:
|
|||
cmake --build build --config Release --parallel 4
|
||||
working-directory: ${{ inputs.cwd }}
|
||||
|
||||
- name: smoke test on non-Windows
|
||||
if: ${{ !startsWith(inputs.runner, 'windows') }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ! -f build/iwasm ]]; then
|
||||
echo "iwasm binary is not found in the expected location."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build/iwasm --version
|
||||
working-directory: ${{ inputs.cwd }}
|
||||
|
||||
- name: smoke test on Windows
|
||||
if: ${{ startsWith(inputs.runner, 'windows') }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ! -f build/Release/iwasm ]]; then
|
||||
echo "iwasm binary is not found in the expected location."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build/Release/iwasm --version
|
||||
working-directory: ${{ inputs.cwd }}
|
||||
|
||||
- name: Compress the binary on Windows
|
||||
if: inputs.runner == 'windows-latest'
|
||||
run: |
|
||||
|
|
24
.github/workflows/build_wamrc.yml
vendored
24
.github/workflows/build_wamrc.yml
vendored
|
@ -62,6 +62,30 @@ jobs:
|
|||
cmake --build build --config Release --parallel 4
|
||||
working-directory: wamr-compiler
|
||||
|
||||
- name: smoke test on non-windows
|
||||
if: ${{ !startsWith(inputs.runner, 'windows') }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ! -f build/wamrc ]]; then
|
||||
echo "wamrc binary is not found in the expected location."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build/wamrc --version
|
||||
working-directory: wamr-compiler
|
||||
|
||||
- name: smoke test on Windows
|
||||
if: ${{ startsWith(inputs.runner, 'windows') }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ! -f build/Release/wamrc ]]; then
|
||||
echo "wamrc binary is not found in the expected location."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build/Release/wamrc --version
|
||||
working-directory: wamr-compiler
|
||||
|
||||
- name: Compress the binary on Windows
|
||||
if: inputs.runner == 'windows-latest' && inputs.release
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue
Block a user