Skip to content

Commit 419f5cb

Browse files
kylo5abydependabot[bot]yamtTianlongLiangSepta2112
authored
Merge and solve conflict for extended const (#4435)
* build(deps): Bump github/codeql-action from 3.28.18 to 3.28.19 (#4346) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.28.19. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v3.28.18...v3.28.19) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.19 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * wasi_socket_ext.c: avoid tls to make this library-friendly (#4338) * Enable aot memory64 sw bounds checks by default (#4350) - enable aot memory64 sw bounds checks by default * build(deps): Bump requests from 2.32.3 to 2.32.4 in /build-scripts (#4349) Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.32.3...v2.32.4) --- updated-dependencies: - dependency-name: requests dependency-version: 2.32.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * wasi_nn_types.h: remove a seemingly stale comment (#4348) * add heap-type check for GC when ref.null (#4300) - According to [Link 1](https://webassembly.github.io/gc/core/valid/instructions.html#xref-syntax-instructions-syntax-instr-ref-mathsf-ref-null-mathit-ht), we must ensure that the heap type is valid when ref.null. - According to [Link 2](https://webassembly.github.io/gc/core/valid/types.html#heap-types), a heap type is considered valid if it is either a concrete heap type or an abstract heap type. However, in this function, the check for abstract heap types (absheaptype) was clearly missing, so this condition needs to be added explicitly in the if statement. - When GC is disabled, no change is needed. - When GC is enabled, heap types in WAMR are LEB-encoded values ([Link 3](https://webassembly.github.io/gc/core/appendix/index-types.html)). Therefore, we must use read_leb_int32 to parse the heap type correctly. And we can compute the original type1 using type1 = (uint8)((int32)0x80 + heap_type);. * wamr-wasi-extensions: add a cmake package to provide our wasi extension (#4344) * wasi_ephemeral_nn.h: add a convenience wrapper header * wamr-wasi-extensions: add a cmake package to provide our wasi extension the sample app was tested with: * wasmtime * iwasm with #4308 currently only contains wasi-nn. maybe it makes sense to add lib-socket things as well. cf. #4288 * wasi_nn_openvino.c: remove the tensor layout adjustment logic (#4308) the logic in question seems like an attempt to work around some application bugs. my wild guess is that it was for classification-example. cf. bytecodealliance/wasmtime#10867 * Update type validation in load_table_import() and load_table() (#4296) Prevent from value type. https://webassembly.github.io/spec/core/valid/types.html#table-types https://webassembly.github.io/gc/core/syntax/types.html#reference-types * Follow #4268 to deprecate wamr_ide-related components (#4341) refer to: Bypass wamr_ide-related components from the release process. (#4268) * clean up incompatible running mode checks in test script and ci (#4342) Rearrange the content of do_execute_in_running_mode() in alphabetical order. Add an incompatible check for x86_32. Now, all belows will be bypassed: - jit, fast-jit, multi-tier-jit - memory64 - multi-memory - simd * Update WABT downloads URL (#4357) Plus, skip unsupported running mode instead quit during wamr compiler test * Modify AOT static PGO to conform to llvm-18 and add a CI job to test static PGO on the coremark benchmark (#4345) * static PGO compatible with llvm18 and add CI job to test static PGO on coremark benchmark * update comments and warning info, bitmaps section in llvm profdata shouldn't be used in PGO * Collective fix for typos and minor bugs (#4369) * wasi-nn: fix backend leak on multiple loads (#4366) cf. #4340 * build(deps): Bump github/codeql-action from 3.28.19 to 3.29.0 (#4371) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.19 to 3.29.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v3.28.19...v3.29.0) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add validation for array type in load_init_expr(GC only) (#4370) * wasi_nn_openvino.c: remove broken xml check (#4365) `xml.buf[xml.size]` check is broken because it accesses past the end of the buffer. anyway, openvino doesn't seem to care the NUL termination. * wamr-wasi-extensions: add lib-socket things (#4360) * improve installation steps for wasi-sdk and wabt on Windows (#4359) * wasi_ephemeral_nn.h: prefix identfiers to avoid too generic names (#4358) * wasi_nn_openvino.c: add a missing buffer overflow check in get_output (#4353) cf. #4351 * send an empty/error reply from server (#4362) Signed-off-by: Su Yihan <yihan.su@intel.com> * wasi_nn_openvino.c: remove pre/postprocessing and layout assumptions (#4361) as wasi-nn doesn't have these concepts, the best we can do without risking breaking certain applications here is to pass through tensors as they are. this matches wasmtime's behavior. tested with: * wasmtime classification-example (with this change, this example fails on tensor size mismatch instead of implicitly resizing it.) * license-plate-recognition-barrier-0007, a converted version with non-fp32 output. [1] (with this change, this model outputs integers as expected.) [1] https://github.com/openvinotoolkit/open_model_zoo/tree/cd7ebe313b69372763e76b82e5d24935308fece4/models/public/license-plate-recognition-barrier-0007 * add nn-cli example (#4373) an example application with flexible cli options which aims to allow us to perform any wasi-nn operations. eg. ``` --load-graph=file=fixture/model.xml,file=fixture/model.bin,id=graph --init-execution-context=graph-id=graph,id=ctx --set-input=file=fixture/tensor.bgr,context-id=ctx,dim=1,dim=3,dim=224,dim=224 --compute=context-id=ctx --get-output=context-id=ctx,file=output.bin ``` * wasi-nn: apply the shared library hack to darwin as well (#4374) copied from the linux version. i'm a bit skeptical with this workaround though. it might be simpler to prohibit the use of wamr api in these shared libraries. after all, what these libraries do is nothing specific to wasm. * wasi-nn: don't try to deinit uninitialized backend (#4375) cf. #4339 * core/iwasm/libraries/wasi-nn/test/build.sh: add a tip for intel mac (#4389) i keep forgetting this and had to re-investigate it at least twice. hopefully this can be helpful for others too. * wasi_nn_tensorflowlite.cpp: reject non-fp32 input earlier (#4388) this backend assumes fp32 here and there. it's safer to reject unexpected inputs explicitly. * Fix several issues related to night-run CI and test scripts. (#4385) - remove duplicated options - fix test script - change ci to use binary * core/iwasm/libraries/wasi-nn/test: use the correct version of keras (#4383) * wasi-nn: fix tensor_data abi for wasi_ephemeral_nn (#4379) it's "(list u8)" in the witx definition. the new definition matches both of our own host definition (struct tensor_wasm) and wasmtime. cf. #4352 * enable WAMR_BUILD_WASI_EPHEMERAL_NN by default (#4381) cf. #4326 * deprecate legacy WAMR-specific "wasi_nn" module (#4382) wasi_nn.h: deprecate legacy "wasi_nn" cf. #4326 * wasi-nn: add minimum serialization on WASINNContext (#4387) currently this is not necessary because context (WASINNContext) is local to instance. (wasm_module_instance_t) i plan to make a context shared among instances in a cluster when fixing #4313. this is a preparation for that direction. an obvious alternative is to tweak the module instance context APIs to allow declaring some kind of contexts instance-local. but i feel, in this particular case, it's more natural to make "wasi-nn handles" shared among threads within a "process". note that, spec-wise, how wasi-nn behaves wrt threads is not defined at all because wasi officially doesn't have threads yet. i suppose, at this point, that how wasi-nn interacts with wasi-threads is something we need to define by ourselves, especially when we are using an outdated wasi-nn version. with this change, if a thread attempts to access a context while another thread is using it, we simply make the operation fail with the "busy" error. this is intended for the mimimum serialization to avoid problems like crashes/leaks/etc. this is not intended to allow parallelism or such. no functional changes are intended at this point yet. cf. #4313 #2430 * Improve spec test execution by adding retry logic for transient errors (#4393) * wasi_nn_openvino.c: implement multiple models per instance (#4380) tested with two models: ``` --load-graph=id=graph1,file=public/license-plate-recognition-barrier-0007/FP32/license-plate-recognition-barrier-0007.xml,file=public/license-plate-recognition-barrier-0007/FP32/license-plate-recognition-barrier-0007.bin \ --load-graph=id=graph2,file=classify/model.xml,file=classify/model.bin \ --init-execution-context=id=exec1,graph-id=graph1 \ --init-execution-context=id=exec2,graph-id=graph2 \ --set-input=context-id=exec1,dim=1,dim=24,dim=94,dim=3,file=out.bin \ --set-input=context-id=exec2,file=classify/banana-3x224x224-bgr.bin,dim=1,dim=3,dim=224,dim=224 \ --compute=context-id=exec1 \ --compute=context-id=exec2 \ --get-output=context-id=exec1,file=exec1-result.bin \ --get-output=context-id=exec2,file=exec2-result.bin ``` a detailed HOWTO: #4380 (comment) * wamr-wasi-extensions/socket: disable reference-types (#4392) and add a comment to explain why. * CI: fix the description of upload_url (#4407) * wasi-nn: fix context lifetime issues (#4396) * wasi-nn: fix context lifetime issues use the module instance context api instead of trying to roll our own with a hashmap. this fixes context lifetime problems mentioned in #4313. namely, * wasi-nn resources will be freed earlier now. before this change, they used to be kept until the runtime shutdown. (wasm_runtime_destroy) after this change, they will be freed together with the associated instances. * wasm_module_inst_t pointer uniqueness assumption (which is wrong after wasm_runtime_deinstantiate) was lifted. as a side effect, this change also makes a context shared among threads within a cluster. note that this is a user-visible api/abi breaking change. before this change, wasi-nn "handles" like wasi_ephemeral_nn_graph were thread-local. after this change, they are shared among threads within a cluster, similarly to wasi file descriptors. spec-wise, either behavior should be ok simply because wasi officially doesn't have threads yet. althogh i feel the latter semantics is more intuitive, if your application depends on the thread-local behavior, this change breaks your application. tested with wamr-wasi-extensions/samples/nn-cli, modified to call each wasi-nn operations on different threads. (if you are interested, you can find the modification at https://github.com/yamt/wasm-micro-runtime/tree/yamt-nn-wip-20250619.) cf. #4313 #2430 * runtime_lib.cmake: enable WAMR_BUILD_MODULE_INST_CONTEXT for wasi-nn as we do for wasi (WAMR_BUILD_LIBC_WASI) * wasi_nn_tensorflowlite.cpp: fix get_output return size (#4390) it should be byte size, not the number of (fp32) values. i'm ambivalent about how to deal with the compatibility for the legacy wamr-specific "wasi_nn". for now, i avoided changing it. (so that existing tests using the legacy abi, namely test_tensorflow.c and test_tensorflow_quantized.c, passes as they are.) if we have any users who still want to use the legacy abi, i suppose they consider the compatibility is more important than the consistency with other backends. cf. #4376 * Refactor copy callstack feature (#4401) - Change `WAMR_ENABLE_COPY_CALLSTACK` to `WAMR_BUILD_COPY_CALL_STACK`, as `WAMR_BUILD` is the prefix for a command line option. - Change `WAMR_ENABLE_COPY_CALLSTACK` to `WASM_ENABLE_COPY_CALL_STACK`, as `WASM_ENABLE` is the prefix for a macro in the source code. - Change `CALLSTACK` to `CALL_STACK` to align with the existing `DUMP_CALL_STACK` feature. - Continue using `WASMCApiFrame` instead of `wasm_frame_t` outside of *wasm_c_api.xxx* to avoid a typedef redefinition warning, which is identified by Clang. * loader: add type index checking (#4402) * Fix handling of non-nullable global_type during global import (#4408) * wasi_nn_llamacpp.c: make this compilable (#4403) * fix bug in bh_vector when extending (#4414) * Collective fix (#4413) * Fix vector growth check and typos in core (#9) * Fix resource cleanup in memory and running modes tests (#10) * Add end of file empty line in wasm_running_modes_test.cc * wasi-nn: make the host use the wasi_ephemeral_nn version of tensor_data (#4411) the motivations: * make the actual input size available to the backends. (currently the backends have to make a guess from shape/type.) * make the host logic look a bit similar to wasi_ephemeral_nn. this is a backend api/abi change. * wasi_nn_llamacpp.c: fix buffer overruns in set_input (#4420) note: for some reasons, wasmedge seems to ignore type/dimensions for the input of ggml. some user code relies on it. cf. second-state/WasmEdge-WASINN-examples#196 note: despite the comment in our code, the input doesn't seem nul-terminated. * wasi_nn_llamacpp.c: remove an unused variable (#4415) * Fix few shadow warnings (#4409) - declaration of ‘memidx’ shadows a previous local - declaration of ‘count’ shadows a previous local * CI: build wamr-wasi-extensions (#4394) * wamr-wasi-extensions: separate test scripts also, allow to specify the prefix directory. for the convenience of the CI. * CI: build wamr-wasi-extensions fragments are copied from compilation_on_macos.yml. (thus intel copyright notice) * wasi_nn_openvino.c: fix a debug build (#4416) after "wasi_nn_openvino.c: implement multiple models per instance" change. (#4380) * loader: fix a potential overflow issue (#4427) * CI: revert SGX retry attempts (#4421) * Revert "Improve spec test execution by adding retry logic for transient errors (#4393)" This reverts commit 64cafaf. * Revert "Add error handling for sgx ci (#4222)" This reverts commit 8ad4789. * implement extended const expr (#4318) * add a toggle to enable extended const on wamrc (#4412) --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Su Yihan <yihan.su@intel.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com> Co-authored-by: TianlongLiang <111852609+TianlongLiang@users.noreply.github.com> Co-authored-by: Liu Jia <jia3.liu@intel.com> Co-authored-by: liang.he <liang.he@intel.com> Co-authored-by: Su Yihan <yihan.su@intel.com>
1 parent ff132c3 commit 419f5cb

File tree

82 files changed

+2040
-789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2040
-789
lines changed

.github/actions/install-wasi-sdk-wabt/action.yml

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,96 @@ runs:
3030
if: ${{ startsWith(inputs.os, 'ubuntu') }}
3131
shell: bash
3232
run: |
33+
echo "Downloading wasi-sdk for Ubuntu..."
3334
sudo wget -O wasi-sdk.tar.gz --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz
35+
36+
echo "Extracting wasi-sdk..."
3437
sudo tar -xf wasi-sdk.tar.gz
3538
sudo ln -sf wasi-sdk-25.0-x86_64-linux/ wasi-sdk
39+
40+
echo "Downloading wabt for Ubuntu..."
3641
sudo wget -O wabt.tar.gz --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-ubuntu-20.04.tar.gz
42+
43+
echo "Extracting wabt..."
3744
sudo tar -xf wabt.tar.gz
3845
sudo ln -sf wabt-1.0.37 wabt
46+
3947
/opt/wasi-sdk/bin/clang --version
4048
/opt/wabt/bin/wasm-interp --version
49+
4150
echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on ubuntu"
4251
working-directory: /opt
4352

4453
- name: Set up wasi-sdk and wabt on macOS-13 (intel)
4554
if: ${{ inputs.os == 'macos-13' }}
4655
shell: bash
4756
run: |
57+
echo "Downloading wasi-sdk for macOS-13..."
4858
sudo wget -O wasi-sdk.tar.gz --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-macos.tar.gz
59+
60+
echo "Extracting wasi-sdk..."
4961
sudo tar -xf wasi-sdk.tar.gz
5062
sudo ln -sf wasi-sdk-25.0-x86_64-macos wasi-sdk
63+
64+
echo "Downloading wabt for macOS-13..."
5165
sudo wget -O wabt.tar.gz --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/1.0.36/wabt-1.0.36-macos-12.tar.gz
66+
67+
echo "Extracting wabt..."
5268
sudo tar -xf wabt.tar.gz
5369
sudo ln -sf wabt-1.0.36 wabt
70+
5471
/opt/wasi-sdk/bin/clang --version
5572
/opt/wabt/bin/wasm-interp --version
73+
5674
echo "::notice::wasi-sdk-25 and wabt-1.0.36 installed on macos-13"
5775
working-directory: /opt
5876

5977
- name: Set up wasi-sdk and wabt on macOS-14 (arm64)
6078
if: ${{ inputs.os == 'macos-14' }}
6179
shell: bash
6280
run: |
81+
echo "Downloading wasi-sdk for macOS-14..."
6382
sudo wget -O wasi-sdk.tar.gz --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-arm64-macos.tar.gz
83+
84+
echo "Extracting wasi-sdk..."
6485
sudo tar -xf wasi-sdk.tar.gz
6586
sudo ln -sf wasi-sdk-25.0-arm64-macos wasi-sdk
87+
88+
echo "Downloading wabt for macOS-14..."
6689
sudo wget -O wabt.tar.gz --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-macos-14.tar.gz
90+
91+
echo "Extracting wabt..."
6792
sudo tar -xf wabt.tar.gz
6893
sudo ln -sf wabt-1.0.37 wabt
94+
6995
/opt/wasi-sdk/bin/clang --version
7096
/opt/wabt/bin/wasm-interp --version
97+
7198
echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on macos-14"
7299
working-directory: /opt
73100

74-
#TODO: Add support for Windows
75101
- name: Set up wasi-sdk and wabt on Windows
76102
if: ${{ startsWith(inputs.os, 'windows') }}
77-
shell: powershell
103+
shell: bash
78104
run: |
79-
echo "::notice::Support for Windows is not implemented yet"
80-
exit 1
105+
choco install -y wget
106+
107+
mkdir -p /opt/wasi-sdk
108+
mkdir -p /opt/wabt
109+
110+
echo "Downloading wasi-sdk for Windows..."
111+
wget -O wasi-sdk.tar.gz --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-windows.tar.gz
112+
113+
echo "Extracting wasi-sdk..."
114+
tar --strip-components=1 -xf wasi-sdk.tar.gz -C /opt/wasi-sdk
115+
116+
echo "Downloading wabt for Windows..."
117+
wget -O wabt.tar.gz --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-windows.tar.gz
118+
119+
echo "Extracting wabt..."
120+
tar --strip-components=1 -xf wabt.tar.gz -C /opt/wabt
121+
122+
/opt/wasi-sdk/bin/clang --version
123+
/opt/wabt/bin/wasm-interp --version
124+
125+
echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on Windows"

.github/workflows/build_iwasm_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
type: string
2424
required: true
2525
upload_url:
26-
description: a semantic version number. it is required when `release` is true.
26+
description: upload binary assets to the URL of release
2727
type: string
2828
required: false
2929
ver_num:

.github/workflows/build_wamrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
type: string
2424
required: true
2525
upload_url:
26-
description: a semantic version number. it is required when `release` is true.
26+
description: upload binary assets to the URL of release
2727
type: string
2828
required: false
2929
ver_num:

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
# Initializes the CodeQL tools for scanning.
5555
- name: Initialize CodeQL
56-
uses: github/codeql-action/init@v3.28.18
56+
uses: github/codeql-action/init@v3.29.0
5757
with:
5858
languages: ${{ matrix.language }}
5959

@@ -70,7 +70,7 @@ jobs:
7070
- run: |
7171
./.github/scripts/codeql_buildscript.sh
7272
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@v3.28.18
73+
uses: github/codeql-action/analyze@v3.29.0
7474
with:
7575
category: "/language:${{matrix.language}}"
7676
upload: false
@@ -99,7 +99,7 @@ jobs:
9999
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
100100

101101
- name: Upload CodeQL results to code scanning
102-
uses: github/codeql-action/upload-sarif@v3.28.18
102+
uses: github/codeql-action/upload-sarif@v3.29.0
103103
with:
104104
sarif_file: ${{ steps.step1.outputs.sarif-output }}
105105
category: "/language:${{matrix.language}}"

.github/workflows/compilation_on_android_ubuntu.yml

Lines changed: 0 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -621,49 +621,6 @@ jobs:
621621
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
622622
running_mode: aot
623623
test_option: $WAMR_COMPILER_TEST_OPTIONS
624-
exclude:
625-
# incompatible modes and features
626-
# classic-interp doesn't support simd
627-
- running_mode: "classic-interp"
628-
test_option: $SIMD_TEST_OPTIONS
629-
# llvm jit doesn't support multi module
630-
- running_mode: "jit"
631-
test_option: $MULTI_MODULES_TEST_OPTIONS
632-
# fast-jit doesn't support multi module, simd
633-
- running_mode: "fast-jit"
634-
test_option: $MULTI_MODULES_TEST_OPTIONS
635-
- running_mode: "fast-jit"
636-
test_option: $SIMD_TEST_OPTIONS
637-
# multi-tier-jit doesn't support multi module, simd
638-
- running_mode: "multi-tier-jit"
639-
test_option: $MULTI_MODULES_TEST_OPTIONS
640-
- running_mode: "multi-tier-jit"
641-
test_option: $SIMD_TEST_OPTIONS
642-
# fast-jit and multi-tier-jit don't support GC
643-
- running_mode: "fast-jit"
644-
test_option: $GC_TEST_OPTIONS
645-
- running_mode: "multi-tier-jit"
646-
test_option: $GC_TEST_OPTIONS
647-
# fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Memory64
648-
- running_mode: "fast-interp"
649-
test_option: $MEMORY64_TEST_OPTIONS
650-
- running_mode: "fast-jit"
651-
test_option: $MEMORY64_TEST_OPTIONS
652-
- running_mode: "jit"
653-
test_option: $MEMORY64_TEST_OPTIONS
654-
- running_mode: "multi-tier-jit"
655-
test_option: $MEMORY64_TEST_OPTIONS
656-
# aot, fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Multi Memory
657-
- running_mode: "aot"
658-
test_option: $MULTI_MEMORY_TEST_OPTIONS
659-
- running_mode: "fast-interp"
660-
test_option: $MULTI_MEMORY_TEST_OPTIONS
661-
- running_mode: "fast-jit"
662-
test_option: $MULTI_MEMORY_TEST_OPTIONS
663-
- running_mode: "jit"
664-
test_option: $MULTI_MEMORY_TEST_OPTIONS
665-
- running_mode: "multi-tier-jit"
666-
test_option: $MULTI_MEMORY_TEST_OPTIONS
667624

668625
steps:
669626
- name: checkout
@@ -767,123 +724,3 @@ jobs:
767724
eval $(opam env)
768725
./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
769726
working-directory: ./tests/wamr-test-suites
770-
771-
test-wamr-ide:
772-
needs:
773-
[
774-
build_iwasm
775-
]
776-
runs-on: ubuntu-22.04
777-
env:
778-
PYTHON_VERSION: '3.10'
779-
PYTHON_UBUNTU_STANDALONE_BUILD: https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11+20230507-x86_64-unknown-linux-gnu-install_only.tar.gz
780-
781-
steps:
782-
- name: checkout
783-
uses: actions/checkout@v4
784-
785-
- name: install dependencies
786-
run: |
787-
rustup target add wasm32-wasip1
788-
sudo apt update && sudo apt-get install -y lld ninja-build
789-
npm install
790-
working-directory: test-tools/wamr-ide/VSCode-Extension
791-
792-
- name: code style check
793-
run: |
794-
npm install --save-dev prettier
795-
npm run prettier-format-check
796-
working-directory: test-tools/wamr-ide/VSCode-Extension
797-
798-
- name: build iwasm with source debugging feature
799-
run: |
800-
mkdir build
801-
cd build
802-
cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 -DWAMR_BUILD_REF_TYPES=1
803-
make
804-
working-directory: product-mini/platforms/linux
805-
806-
- name: Cache LLDB
807-
id: cache-lldb
808-
uses: actions/cache@v4
809-
env:
810-
cache-name: cache-lldb-vscode
811-
with:
812-
path: test-tools/wamr-ide/VSCode-Extension/resource/debug/linux
813-
key: ${{ env.cache-name }}-${{ hashFiles('build-scripts/lldb_wasm.patch') }}-${{ env.PYTHON_UBUNTU_STANDALONE_BUILD }}
814-
815-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
816-
name: get stand-alone python ubuntu
817-
run: |
818-
wget ${{ env.PYTHON_UBUNTU_STANDALONE_BUILD }} -O python.tar.gz
819-
tar -xvf python.tar.gz
820-
working-directory: core/deps
821-
822-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
823-
name: download llvm
824-
run: |
825-
wget https://github.com/llvm/llvm-project/archive/1f27fe6128769f00197925c3b8f6abb9d0e5cd2e.zip
826-
unzip -q 1f27fe6128769f00197925c3b8f6abb9d0e5cd2e.zip
827-
mv llvm-project-1f27fe6128769f00197925c3b8f6abb9d0e5cd2e llvm-project
828-
working-directory: core/deps
829-
830-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
831-
name: apply wamr patch
832-
run: |
833-
git init
834-
git config user.email "action@github.com"
835-
git config user.name "github action"
836-
git apply ../../../build-scripts/lldb_wasm.patch
837-
working-directory: core/deps/llvm-project
838-
839-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
840-
name: build lldb ubuntu
841-
run: |
842-
echo "start to build lldb..."
843-
mkdir -p wamr-lldb
844-
cmake -S ./llvm -B build \
845-
-G Ninja \
846-
-DCMAKE_INSTALL_PREFIX=../wamr-lldb \
847-
-DCMAKE_BUILD_TYPE:STRING="Release" \
848-
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
849-
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
850-
-DLLVM_TARGETS_TO_BUILD:STRING="X86;WebAssembly" \
851-
-DLLVM_BUILD_BENCHMARKS:BOOL=OFF \
852-
-DLLVM_BUILD_DOCS:BOOL=OFF \
853-
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
854-
-DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
855-
-DLLVM_BUILD_TESTS:BOOL=OFF \
856-
-DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
857-
-DLLVM_INCLUDE_DOCS:BOOL=OFF \
858-
-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
859-
-DLLVM_INCLUDE_TESTS:BOOL=OFF \
860-
-DLLVM_ENABLE_BINDINGS:BOOL=OFF \
861-
-DLLVM_ENABLE_LIBXML2:BOOL=ON \
862-
-DLLVM_ENABLE_LLD:BOOL=ON \
863-
-DLLDB_ENABLE_PYTHON:BOOL=ON \
864-
-DLLDB_EMBED_PYTHON_HOME=ON \
865-
-DLLDB_PYTHON_HOME=.. \
866-
-DLLDB_PYTHON_RELATIVE_PATH=lib/lldb-python \
867-
-DPython3_EXECUTABLE="$(pwd)/../python/bin/python${{ env.PYTHON_VERSION }}"
868-
cmake --build build --target lldb install --parallel $(nproc)
869-
working-directory: core/deps/llvm-project
870-
871-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
872-
name: copy lldb to extension folder
873-
run: |
874-
mkdir -p bin
875-
mkdir -p lib
876-
cp ../../../../../../core/deps/llvm-project/lldb/tools/lldb-vscode/package.json ./
877-
cp -r ../../../../../../core/deps/llvm-project/lldb/tools/lldb-vscode/syntaxes/ ./
878-
cp ../../../../../../core/deps/llvm-project/build/bin/lldb* bin
879-
cp ../../../../../../core/deps/llvm-project/build/lib/liblldb*.so lib
880-
cp ../../../../../../core/deps/llvm-project/build/lib/liblldb*.so.* lib
881-
cp -R ../../../../../../core/deps/llvm-project/build/lib/lldb-python lib
882-
cp -R ../../../../../../core/deps/python/lib/python* lib
883-
cp ../../../../../../core/deps/python/lib/libpython${{ env.PYTHON_VERSION }}.so.1.0 lib
884-
working-directory: test-tools/wamr-ide/VSCode-Extension/resource/debug/linux
885-
886-
- name: run tests
887-
timeout-minutes: 5
888-
run: xvfb-run npm run test
889-
working-directory: test-tools/wamr-ide/VSCode-Extension

.github/workflows/compilation_on_sgx.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -291,28 +291,6 @@ jobs:
291291
292292
- name: run spec tests
293293
run: |
294-
set +e
295294
source /opt/intel/sgxsdk/environment
296-
attempts=0
297-
max_attempts=3
298-
299-
while [ $attempts -lt $max_attempts ]; do
300-
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
301-
exitcode="$?"
302-
303-
if [ $exitcode -eq 0 ]; then
304-
echo "Spec test passed"
305-
exit 0
306-
elif [ $exitcode -ne 143 ]; then
307-
echo "Spec test failed with error code $exitcode"
308-
exit 1
309-
fi
310-
311-
echo "$exitcode is a known GitHub-hosted runner issue"
312-
echo "::notice::Re-running the spec test due to error code 143"
313-
attempts=$((attempts + 1))
314-
done
315-
316-
echo "::notice::Report an error with code 143 in SGX CI after $max_attempts attempts"
317-
exit 143
295+
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
318296
working-directory: ./tests/wamr-test-suites

.github/workflows/compilation_on_windows.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ jobs:
172172
run: ./build.sh
173173
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/
174174

175+
- name: install wget
176+
shell: bash
177+
run: choco install wget
178+
175179
- name: run tests
176180
shell: bash
177181
timeout-minutes: 20

0 commit comments

Comments
 (0)