@@ -46,11 +46,14 @@ concurrency:
46
46
cancel-in-progress : true
47
47
48
48
env :
49
- AOT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
50
- CLASSIC_INTERP_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
51
- FAST_INTERP_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
52
- LLVM_LAZY_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
53
- LLVM_EAGER_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
49
+ # For BUILD
50
+ AOT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
51
+ CLASSIC_INTERP_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
52
+ FAST_INTERP_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
53
+ FAST_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
54
+ LLVM_LAZY_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
55
+ LLVM_EAGER_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
56
+ MULTI_TIER_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
54
57
55
58
permissions :
56
59
contents : read
@@ -214,33 +217,67 @@ jobs:
214
217
working-directory : product-mini/platforms/${{ matrix.platform }}
215
218
216
219
build_samples_wasm_c_api :
217
- needs : [build_iwasm]
220
+ needs :
221
+ [
222
+ build_iwasm,
223
+ build_llvm_libraries_on_intel_macos,
224
+ build_wamrc,
225
+ ]
218
226
runs-on : ${{ matrix.os }}
219
227
strategy :
220
228
matrix :
221
229
make_options : [
222
- # Running modes supported
230
+ $AOT_BUILD_OPTIONS,
223
231
$CLASSIC_INTERP_BUILD_OPTIONS,
224
232
$FAST_INTERP_BUILD_OPTIONS,
225
- # Running modes unsupported
226
- # $LLVM_LAZY_JIT_BUILD_OPTIONS,
227
- # $LLVM_EAGER_JIT_BUILD_OPTIONS,
228
- # $AOT_BUILD_OPTIONS ,
233
+ $FAST_JIT_BUILD_OPTIONS,
234
+ $LLVM_LAZY_JIT_BUILD_OPTIONS,
235
+ $LLVM_EAGER_JIT_BUILD_OPTIONS,
236
+ $MULTI_TIER_JIT_BUILD_OPTIONS ,
229
237
]
230
238
os : [macos-13]
239
+ include :
240
+ - os : macos-13
241
+ llvm_cache_key : ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }}
242
+
231
243
steps :
232
244
- name : checkout
233
245
uses : actions/checkout@v4
234
246
247
+ - name : Get LLVM libraries
248
+ id : retrieve_llvm_libs
249
+ if : (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS'))
250
+ uses : actions/cache@v4
251
+ with :
252
+ path : |
253
+ ./core/deps/llvm/build/bin
254
+ ./core/deps/llvm/build/include
255
+ ./core/deps/llvm/build/lib
256
+ ./core/deps/llvm/build/libexec
257
+ ./core/deps/llvm/build/share
258
+ key : ${{ matrix.llvm_cache_key }}
259
+
260
+ - name : Quit if cache miss
261
+ if : (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS')) && (steps.retrieve_llvm_libs.outputs.cache-hit != 'true')
262
+ run : echo "::error::can not get prebuilt llvm libraries" && exit 1
263
+
235
264
- name : install-wasi-sdk-wabt
236
265
uses : ./.github/actions/install-wasi-sdk-wabt
237
266
with :
238
267
os : ${{ matrix.os }}
239
268
269
+ - name : Build wamrc
270
+ if : (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS'))
271
+ run : |
272
+ mkdir build && cd build
273
+ cmake ..
274
+ cmake --build . --config Release --parallel 4
275
+ working-directory : wamr-compiler
276
+
240
277
- name : Build Sample [wasm-c-api]
241
278
run : |
242
279
cmake -S . -B build ${{ matrix.make_options }}
243
- cmake --build build --config Release --parallel 4
280
+ cmake --build build --config Debug --parallel 4
244
281
ctest --test-dir build --output-on-failure
245
282
working-directory : samples/wasm-c-api
246
283
0 commit comments