3131 type : string
3232 required : false
3333
34+ env :
35+ DEFAULT_BUILD_OPTIONS :
36+ " -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"
61+ GC_EH_BUILD_OPTIONS :
62+ " -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"
89+
90+ permissions :
91+ contents : read
92+
3493jobs :
3594 build :
3695 runs-on : ${{ inputs.runner }}
96+ strategy :
97+ matrix :
98+ include :
99+ - build_options : $DEFAULT_BUILD_OPTIONS
100+ suffix : ' '
101+ - build_options : $GC_EH_BUILD_OPTIONS
102+ suffix : ' -gc-eh'
103+ permissions :
104+ contents : write # for uploading release artifacts
105+
37106 steps :
38107 - uses : actions/checkout@v4
39108
@@ -51,40 +120,25 @@ jobs:
51120 fail-on-cache-miss : true
52121
53122 - name : generate iwasm binary release
123+ shell : bash
54124 run : |
55- cmake -S . -B build \
56- -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \
57- -DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
58- -DWAMR_BUILD_DEBUG_INTERP=0 \
59- -DWAMR_BUILD_DEBUG_AOT=0 \
60- -DWAMR_BUILD_DUMP_CALL_STACK=0 \
61- -DWAMR_BUILD_LIBC_UVWASI=0 \
62- -DWAMR_BUILD_LIBC_EMCC=0 \
63- -DWAMR_BUILD_LIB_RATS=0 \
64- -DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
65- -DWAMR_BUILD_MEMORY_PROFILING=0 \
66- -DWAMR_BUILD_MINI_LOADER=0 \
67- -DWAMR_BUILD_MULTI_MODULE=0 \
68- -DWAMR_BUILD_PERF_PROFILING=0 \
69- -DWAMR_BUILD_SPEC_TEST=0 \
70- -DWAMR_BUILD_BULK_MEMORY=1 \
71- -DWAMR_BUILD_LIB_PTHREAD=1 \
72- -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
73- -DWAMR_BUILD_LIB_WASI_THREADS=1 \
74- -DWAMR_BUILD_LIBC_BUILTIN=1 \
75- -DWAMR_BUILD_LIBC_WASI=1 \
76- -DWAMR_BUILD_REF_TYPES=1 \
77- -DWAMR_BUILD_SIMD=1 \
78- -DWAMR_BUILD_SHARED_MEMORY=1 \
79- -DWAMR_BUILD_TAIL_CALL=1 \
80- -DWAMR_BUILD_THREAD_MGR=1
125+ cmake -S . -B build ${{ matrix.build_options }}
81126 cmake --build build --config Release --parallel 4
82127 working-directory : ${{ inputs.cwd }}
83128
84- - name : compress the binary
129+ - name : Compress the binary on Windows
130+ if : inputs.runner == 'windows-latest'
131+ run : |
132+ tar -czf iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm.exe
133+ Compress-Archive -Path iwasm.exe -DestinationPath iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
134+ mv iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.* ../
135+ working-directory : ${{ inputs.cwd }}/build/Release
136+
137+ - name : compress the binary on non-Windows
138+ if : inputs.runner != 'windows-latest'
85139 run : |
86- tar czf iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm
87- zip iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm
140+ tar czf iwasm${{ matrix.suffix }} -${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm
141+ zip iwasm${{ matrix.suffix }} -${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm
88142 working-directory : ${{ inputs.cwd }}/build
89143
90144 - name : upload release tar.gz
93147 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94148 with :
95149 upload_url : ${{ inputs.upload_url }}
96- asset_path : ${{ inputs.cwd }}/build/iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz
97- asset_name : iwasm-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.tar.gz
150+ asset_path : ${{ inputs.cwd }}/build/iwasm${{ matrix.suffix }} -${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz
151+ asset_name : iwasm${{ matrix.suffix }} -${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.tar.gz
98152 asset_content_type : application/x-gzip
99153
100154 - name : upload release zip
@@ -103,6 +157,6 @@ jobs:
103157 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104158 with :
105159 upload_url : ${{ inputs.upload_url }}
106- asset_path : ${{ inputs.cwd }}/build/iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
107- asset_name : iwasm-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.zip
160+ asset_path : ${{ inputs.cwd }}/build/iwasm${{ matrix.suffix }} -${{ inputs.ver_num }}-${{ inputs.runner }}.zip
161+ asset_name : iwasm${{ matrix.suffix }} -${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.zip
108162 asset_content_type : application/zip
0 commit comments