Skip to content

Commit 1652ed5

Browse files
committed
Add smoke tests for iwasm and wamrc binaries to validate build output
1 parent 7d05dbc commit 1652ed5

File tree

2 files changed

+101
-53
lines changed

2 files changed

+101
-53
lines changed

.github/workflows/build_iwasm_release.yml

Lines changed: 77 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -32,60 +32,60 @@ on:
3232
required: false
3333

3434
env:
35-
DEFAULT_BUILD_OPTIONS:
35+
DEFAULT_BUILD_OPTIONS:
3636
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \
37-
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
38-
-DWAMR_BUILD_DEBUG_INTERP=0 \
39-
-DWAMR_BUILD_DEBUG_AOT=0 \
40-
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
41-
-DWAMR_BUILD_LIBC_UVWASI=0 \
42-
-DWAMR_BUILD_LIBC_EMCC=0 \
43-
-DWAMR_BUILD_LIB_RATS=0 \
44-
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
45-
-DWAMR_BUILD_MEMORY_PROFILING=0 \
46-
-DWAMR_BUILD_MINI_LOADER=0 \
47-
-DWAMR_BUILD_MULTI_MODULE=0 \
48-
-DWAMR_BUILD_PERF_PROFILING=0 \
49-
-DWAMR_BUILD_SPEC_TEST=0 \
50-
-DWAMR_BUILD_BULK_MEMORY=1 \
51-
-DWAMR_BUILD_LIB_PTHREAD=1 \
52-
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
53-
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
54-
-DWAMR_BUILD_LIBC_BUILTIN=1 \
55-
-DWAMR_BUILD_LIBC_WASI=1 \
56-
-DWAMR_BUILD_REF_TYPES=1 \
57-
-DWAMR_BUILD_SIMD=1 \
58-
-DWAMR_BUILD_SHARED_MEMORY=1 \
59-
-DWAMR_BUILD_TAIL_CALL=1 \
60-
-DWAMR_BUILD_THREAD_MGR=1"
37+
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
38+
-DWAMR_BUILD_DEBUG_INTERP=0 \
39+
-DWAMR_BUILD_DEBUG_AOT=0 \
40+
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
41+
-DWAMR_BUILD_LIBC_UVWASI=0 \
42+
-DWAMR_BUILD_LIBC_EMCC=0 \
43+
-DWAMR_BUILD_LIB_RATS=0 \
44+
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
45+
-DWAMR_BUILD_MEMORY_PROFILING=0 \
46+
-DWAMR_BUILD_MINI_LOADER=0 \
47+
-DWAMR_BUILD_MULTI_MODULE=0 \
48+
-DWAMR_BUILD_PERF_PROFILING=0 \
49+
-DWAMR_BUILD_SPEC_TEST=0 \
50+
-DWAMR_BUILD_BULK_MEMORY=1 \
51+
-DWAMR_BUILD_LIB_PTHREAD=1 \
52+
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
53+
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
54+
-DWAMR_BUILD_LIBC_BUILTIN=1 \
55+
-DWAMR_BUILD_LIBC_WASI=1 \
56+
-DWAMR_BUILD_REF_TYPES=1 \
57+
-DWAMR_BUILD_SIMD=1 \
58+
-DWAMR_BUILD_SHARED_MEMORY=1 \
59+
-DWAMR_BUILD_TAIL_CALL=1 \
60+
-DWAMR_BUILD_THREAD_MGR=1"
6161
GC_EH_BUILD_OPTIONS:
6262
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 \
63-
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
64-
-DWAMR_BUILD_DEBUG_INTERP=0 \
65-
-DWAMR_BUILD_DEBUG_AOT=0 \
66-
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
67-
-DWAMR_BUILD_LIBC_UVWASI=0 \
68-
-DWAMR_BUILD_LIBC_EMCC=0 \
69-
-DWAMR_BUILD_LIB_RATS=0 \
70-
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
71-
-DWAMR_BUILD_MEMORY_PROFILING=0 \
72-
-DWAMR_BUILD_MINI_LOADER=0 \
73-
-DWAMR_BUILD_MULTI_MODULE=0 \
74-
-DWAMR_BUILD_PERF_PROFILING=0 \
75-
-DWAMR_BUILD_SPEC_TEST=0 \
76-
-DWAMR_BUILD_BULK_MEMORY=1 \
77-
-DWAMR_BUILD_LIB_PTHREAD=1 \
78-
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
79-
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
80-
-DWAMR_BUILD_LIBC_BUILTIN=1 \
81-
-DWAMR_BUILD_LIBC_WASI=1 \
82-
-DWAMR_BUILD_REF_TYPES=1 \
83-
-DWAMR_BUILD_SIMD=1 \
84-
-DWAMR_BUILD_SHARED_MEMORY=1 \
85-
-DWAMR_BUILD_TAIL_CALL=1 \
86-
-DWAMR_BUILD_THREAD_MGR=1 \
87-
-DWAMR_BUILD_EXCE_HANDLING=1 \
88-
-DWAMR_BUILD_GC=1"
63+
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
64+
-DWAMR_BUILD_DEBUG_INTERP=0 \
65+
-DWAMR_BUILD_DEBUG_AOT=0 \
66+
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
67+
-DWAMR_BUILD_LIBC_UVWASI=0 \
68+
-DWAMR_BUILD_LIBC_EMCC=0 \
69+
-DWAMR_BUILD_LIB_RATS=0 \
70+
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
71+
-DWAMR_BUILD_MEMORY_PROFILING=0 \
72+
-DWAMR_BUILD_MINI_LOADER=0 \
73+
-DWAMR_BUILD_MULTI_MODULE=0 \
74+
-DWAMR_BUILD_PERF_PROFILING=0 \
75+
-DWAMR_BUILD_SPEC_TEST=0 \
76+
-DWAMR_BUILD_BULK_MEMORY=1 \
77+
-DWAMR_BUILD_LIB_PTHREAD=1 \
78+
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
79+
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
80+
-DWAMR_BUILD_LIBC_BUILTIN=1 \
81+
-DWAMR_BUILD_LIBC_WASI=1 \
82+
-DWAMR_BUILD_REF_TYPES=1 \
83+
-DWAMR_BUILD_SIMD=1 \
84+
-DWAMR_BUILD_SHARED_MEMORY=1 \
85+
-DWAMR_BUILD_TAIL_CALL=1 \
86+
-DWAMR_BUILD_THREAD_MGR=1 \
87+
-DWAMR_BUILD_EXCE_HANDLING=1 \
88+
-DWAMR_BUILD_GC=1"
8989

9090
permissions:
9191
contents: read
@@ -97,9 +97,9 @@ jobs:
9797
matrix:
9898
include:
9999
- build_options: $DEFAULT_BUILD_OPTIONS
100-
suffix: ''
100+
suffix: ""
101101
- build_options: $GC_EH_BUILD_OPTIONS
102-
suffix: '-gc-eh'
102+
suffix: "-gc-eh"
103103
permissions:
104104
contents: write # for uploading release artifacts
105105

@@ -126,6 +126,30 @@ jobs:
126126
cmake --build build --config Release --parallel 4
127127
working-directory: ${{ inputs.cwd }}
128128

129+
- name: smoke test on non-Windows
130+
if: ${{ !startsWith(inputs.os, 'windows') }}
131+
shell: bash
132+
run: |
133+
if [[ ! -f build/iwasm ]]; then
134+
echo "iwasm binary is not found in the expected location."
135+
exit 1
136+
fi
137+
138+
build/iwasm --version
139+
working-directory: ${{ inputs.cwd }}
140+
141+
- name: smoke test on Windows
142+
if: ${{ startsWith(inputs.os, 'windows') }}
143+
shell: bash
144+
run: |
145+
if [[ ! -f build/Release/iwasm ]]; then
146+
echo "iwasm binary is not found in the expected location."
147+
exit 1
148+
fi
149+
150+
build/Release/iwasm --version
151+
working-directory: ${{ inputs.cwd }}
152+
129153
- name: Compress the binary on Windows
130154
if: inputs.runner == 'windows-latest'
131155
run: |

.github/workflows/build_wamrc.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@ jobs:
6262
cmake --build build --config Release --parallel 4
6363
working-directory: wamr-compiler
6464

65+
- name: smoke test on non-windows
66+
if: ${{ !startsWith(inputs.runner, 'windows') }}
67+
shell: bash
68+
run: |
69+
if [[ ! -f build/warmc ]]; then
70+
echo "wamrc binary is not found in the expected location."
71+
exit 1
72+
fi
73+
74+
build/wamrc --version
75+
working-directory: wamr-compiler
76+
77+
- name: smoke test on Windows
78+
if: ${{ startsWith(inputs.runner, 'windows') }}
79+
shell: bash
80+
run: |
81+
if [[ ! -f build/Release/wamrc ]]; then
82+
echo "wamrc binary is not found in the expected location."
83+
exit 1
84+
fi
85+
86+
build/Release/wamrc --version
87+
working-directory: wamr-compiler
88+
6589
- name: Compress the binary on Windows
6690
if: inputs.runner == 'windows-latest' && inputs.release
6791
run: |

0 commit comments

Comments
 (0)