Skip to content

fix cmake issue for extended const #4435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
07c23cb
build(deps): Bump github/codeql-action from 3.28.18 to 3.28.19 (#4346)
dependabot[bot] Jun 10, 2025
7f968f5
wasi_socket_ext.c: avoid tls to make this library-friendly (#4338)
yamt Jun 10, 2025
c4623e2
Enable aot memory64 sw bounds checks by default (#4350)
TianlongLiang Jun 12, 2025
d52f083
build(deps): Bump requests from 2.32.3 to 2.32.4 in /build-scripts (#…
dependabot[bot] Jun 12, 2025
c932597
wasi_nn_types.h: remove a seemingly stale comment (#4348)
yamt Jun 12, 2025
928598f
add heap-type check for GC when ref.null (#4300)
Septa2112 Jun 12, 2025
3a087c4
wamr-wasi-extensions: add a cmake package to provide our wasi extensi…
yamt Jun 12, 2025
5478d26
wasi_nn_openvino.c: remove the tensor layout adjustment logic (#4308)
yamt Jun 12, 2025
75bf979
Update type validation in load_table_import() and load_table() (#4296)
lum1n0us Jun 12, 2025
78e68ce
Follow #4268 to deprecate wamr_ide-related components (#4341)
lum1n0us Jun 12, 2025
9becf65
clean up incompatible running mode checks in test script and ci (#4342)
lum1n0us Jun 12, 2025
2fe7105
Update WABT downloads URL (#4357)
lum1n0us Jun 12, 2025
0343aaf
Modify AOT static PGO to conform to llvm-18 and add a CI job to test …
TianlongLiang Jun 12, 2025
8e60feb
Collective fix for typos and minor bugs (#4369)
TianlongLiang Jun 17, 2025
0d001c4
wasi-nn: fix backend leak on multiple loads (#4366)
yamt Jun 17, 2025
d7e3e37
build(deps): Bump github/codeql-action from 3.28.19 to 3.29.0 (#4371)
dependabot[bot] Jun 17, 2025
7bbdbf5
add validation for array type in load_init_expr(GC only) (#4370)
Septa2112 Jun 17, 2025
745da82
wasi_nn_openvino.c: remove broken xml check (#4365)
yamt Jun 17, 2025
05e3a09
wamr-wasi-extensions: add lib-socket things (#4360)
yamt Jun 17, 2025
965f245
improve installation steps for wasi-sdk and wabt on Windows (#4359)
lum1n0us Jun 17, 2025
20be1d3
wasi_ephemeral_nn.h: prefix identfiers to avoid too generic names (#4…
yamt Jun 17, 2025
2f0750a
wasi_nn_openvino.c: add a missing buffer overflow check in get_output…
yamt Jun 17, 2025
6dfb410
send an empty/error reply from server (#4362)
yviansu Jun 17, 2025
c9b8c16
wasi_nn_openvino.c: remove pre/postprocessing and layout assumptions …
yamt Jun 17, 2025
b3ce192
add nn-cli example (#4373)
yamt Jun 17, 2025
4ebd1bb
wasi-nn: apply the shared library hack to darwin as well (#4374)
yamt Jun 17, 2025
cba9001
wasi-nn: don't try to deinit uninitialized backend (#4375)
yamt Jun 17, 2025
4bf799c
core/iwasm/libraries/wasi-nn/test/build.sh: add a tip for intel mac (…
yamt Jun 18, 2025
db7714f
wasi_nn_tensorflowlite.cpp: reject non-fp32 input earlier (#4388)
yamt Jun 18, 2025
8414a20
Fix several issues related to night-run CI and test scripts. (#4385)
lum1n0us Jun 18, 2025
a29f394
core/iwasm/libraries/wasi-nn/test: use the correct version of keras (…
yamt Jun 18, 2025
aa53d64
wasi-nn: fix tensor_data abi for wasi_ephemeral_nn (#4379)
yamt Jun 19, 2025
e5091e4
enable WAMR_BUILD_WASI_EPHEMERAL_NN by default (#4381)
yamt Jun 19, 2025
71c07f3
deprecate legacy WAMR-specific "wasi_nn" module (#4382)
yamt Jun 19, 2025
ea408ab
wasi-nn: add minimum serialization on WASINNContext (#4387)
yamt Jun 20, 2025
64cafaf
Improve spec test execution by adding retry logic for transient error…
lum1n0us Jun 20, 2025
f449b79
wasi_nn_openvino.c: implement multiple models per instance (#4380)
yamt Jun 20, 2025
7471d5a
wamr-wasi-extensions/socket: disable reference-types (#4392)
yamt Jun 20, 2025
92e5f5f
CI: fix the description of upload_url (#4407)
yamt Jun 24, 2025
70c39ba
wasi-nn: fix context lifetime issues (#4396)
yamt Jun 24, 2025
8289452
wasi_nn_tensorflowlite.cpp: fix get_output return size (#4390)
yamt Jun 24, 2025
e414a32
Refactor copy callstack feature (#4401)
lum1n0us Jun 24, 2025
1e41519
loader: add type index checking (#4402)
kylo5aby Jun 24, 2025
535004d
Fix handling of non-nullable global_type during global import (#4408)
Septa2112 Jun 25, 2025
a7aae9d
wasi_nn_llamacpp.c: make this compilable (#4403)
yamt Jun 25, 2025
5b32130
fix bug in bh_vector when extending (#4414)
TianlongLiang Jun 26, 2025
23799a2
Collective fix (#4413)
TianlongLiang Jun 26, 2025
2372a47
wasi-nn: make the host use the wasi_ephemeral_nn version of tensor_da…
yamt Jun 26, 2025
d6876f1
wasi_nn_llamacpp.c: fix buffer overruns in set_input (#4420)
yamt Jun 27, 2025
8ed89e2
wasi_nn_llamacpp.c: remove an unused variable (#4415)
yamt Jun 27, 2025
0641dd1
Fix few shadow warnings (#4409)
lum1n0us Jun 27, 2025
18d4227
CI: build wamr-wasi-extensions (#4394)
yamt Jun 27, 2025
7a6a6a3
wasi_nn_openvino.c: fix a debug build (#4416)
yamt Jun 30, 2025
0127eaf
loader: fix a potential overflow issue (#4427)
kylo5aby Jun 30, 2025
4fbb372
CI: revert SGX retry attempts (#4421)
yamt Jun 30, 2025
b984215
implement extended const expr (#4318)
kylo5aby Jun 24, 2025
f70b7d2
add a toggle to enable extended const on wamrc (#4412)
kylo5aby Jun 26, 2025
46be56f
Merge branch 'dev/extended_const' into dev/extended_const
kylo5aby Jul 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 49 additions & 4 deletions .github/actions/install-wasi-sdk-wabt/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,51 +30,96 @@ runs:
if: ${{ startsWith(inputs.os, 'ubuntu') }}
shell: bash
run: |
echo "Downloading wasi-sdk for Ubuntu..."
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

echo "Extracting wasi-sdk..."
sudo tar -xf wasi-sdk.tar.gz
sudo ln -sf wasi-sdk-25.0-x86_64-linux/ wasi-sdk

echo "Downloading wabt for Ubuntu..."
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

echo "Extracting wabt..."
sudo tar -xf wabt.tar.gz
sudo ln -sf wabt-1.0.37 wabt

/opt/wasi-sdk/bin/clang --version
/opt/wabt/bin/wasm-interp --version

echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on ubuntu"
working-directory: /opt

- name: Set up wasi-sdk and wabt on macOS-13 (intel)
if: ${{ inputs.os == 'macos-13' }}
shell: bash
run: |
echo "Downloading wasi-sdk for macOS-13..."
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

echo "Extracting wasi-sdk..."
sudo tar -xf wasi-sdk.tar.gz
sudo ln -sf wasi-sdk-25.0-x86_64-macos wasi-sdk

echo "Downloading wabt for macOS-13..."
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

echo "Extracting wabt..."
sudo tar -xf wabt.tar.gz
sudo ln -sf wabt-1.0.36 wabt

/opt/wasi-sdk/bin/clang --version
/opt/wabt/bin/wasm-interp --version

echo "::notice::wasi-sdk-25 and wabt-1.0.36 installed on macos-13"
working-directory: /opt

- name: Set up wasi-sdk and wabt on macOS-14 (arm64)
if: ${{ inputs.os == 'macos-14' }}
shell: bash
run: |
echo "Downloading wasi-sdk for macOS-14..."
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

echo "Extracting wasi-sdk..."
sudo tar -xf wasi-sdk.tar.gz
sudo ln -sf wasi-sdk-25.0-arm64-macos wasi-sdk

echo "Downloading wabt for macOS-14..."
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

echo "Extracting wabt..."
sudo tar -xf wabt.tar.gz
sudo ln -sf wabt-1.0.37 wabt

/opt/wasi-sdk/bin/clang --version
/opt/wabt/bin/wasm-interp --version

echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on macos-14"
working-directory: /opt

#TODO: Add support for Windows
- name: Set up wasi-sdk and wabt on Windows
if: ${{ startsWith(inputs.os, 'windows') }}
shell: powershell
shell: bash
run: |
echo "::notice::Support for Windows is not implemented yet"
exit 1
choco install -y wget

mkdir -p /opt/wasi-sdk
mkdir -p /opt/wabt

echo "Downloading wasi-sdk for Windows..."
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

echo "Extracting wasi-sdk..."
tar --strip-components=1 -xf wasi-sdk.tar.gz -C /opt/wasi-sdk

echo "Downloading wabt for Windows..."
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

echo "Extracting wabt..."
tar --strip-components=1 -xf wabt.tar.gz -C /opt/wabt

/opt/wasi-sdk/bin/clang --version
/opt/wabt/bin/wasm-interp --version

echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on Windows"
2 changes: 1 addition & 1 deletion .github/workflows/build_iwasm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
type: string
required: true
upload_url:
description: a semantic version number. it is required when `release` is true.
description: upload binary assets to the URL of release
type: string
required: false
ver_num:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wamrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
type: string
required: true
upload_url:
description: a semantic version number. it is required when `release` is true.
description: upload binary assets to the URL of release
type: string
required: false
ver_num:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

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

Expand All @@ -70,7 +70,7 @@ jobs:
- run: |
./.github/scripts/codeql_buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.28.18
uses: github/codeql-action/analyze@v3.29.0
with:
category: "/language:${{matrix.language}}"
upload: false
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif

- name: Upload CodeQL results to code scanning
uses: github/codeql-action/upload-sarif@v3.28.18
uses: github/codeql-action/upload-sarif@v3.29.0
with:
sarif_file: ${{ steps.step1.outputs.sarif-output }}
category: "/language:${{matrix.language}}"
Expand Down
163 changes: 0 additions & 163 deletions .github/workflows/compilation_on_android_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,49 +621,6 @@ jobs:
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
running_mode: aot
test_option: $WAMR_COMPILER_TEST_OPTIONS
exclude:
# incompatible modes and features
# classic-interp doesn't support simd
- running_mode: "classic-interp"
test_option: $SIMD_TEST_OPTIONS
# llvm jit doesn't support multi module
- running_mode: "jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
# fast-jit doesn't support multi module, simd
- running_mode: "fast-jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $SIMD_TEST_OPTIONS
# multi-tier-jit doesn't support multi module, simd
- running_mode: "multi-tier-jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $SIMD_TEST_OPTIONS
# fast-jit and multi-tier-jit don't support GC
- running_mode: "fast-jit"
test_option: $GC_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $GC_TEST_OPTIONS
# fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Memory64
- running_mode: "fast-interp"
test_option: $MEMORY64_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $MEMORY64_TEST_OPTIONS
- running_mode: "jit"
test_option: $MEMORY64_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $MEMORY64_TEST_OPTIONS
# aot, fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Multi Memory
- running_mode: "aot"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "fast-interp"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "jit"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $MULTI_MEMORY_TEST_OPTIONS

steps:
- name: checkout
Expand Down Expand Up @@ -767,123 +724,3 @@ jobs:
eval $(opam env)
./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
working-directory: ./tests/wamr-test-suites

test-wamr-ide:
needs:
[
build_iwasm
]
runs-on: ubuntu-22.04
env:
PYTHON_VERSION: '3.10'
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

steps:
- name: checkout
uses: actions/checkout@v4

- name: install dependencies
run: |
rustup target add wasm32-wasip1
sudo apt update && sudo apt-get install -y lld ninja-build
npm install
working-directory: test-tools/wamr-ide/VSCode-Extension

- name: code style check
run: |
npm install --save-dev prettier
npm run prettier-format-check
working-directory: test-tools/wamr-ide/VSCode-Extension

- name: build iwasm with source debugging feature
run: |
mkdir build
cd build
cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 -DWAMR_BUILD_REF_TYPES=1
make
working-directory: product-mini/platforms/linux

- name: Cache LLDB
id: cache-lldb
uses: actions/cache@v4
env:
cache-name: cache-lldb-vscode
with:
path: test-tools/wamr-ide/VSCode-Extension/resource/debug/linux
key: ${{ env.cache-name }}-${{ hashFiles('build-scripts/lldb_wasm.patch') }}-${{ env.PYTHON_UBUNTU_STANDALONE_BUILD }}

- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
name: get stand-alone python ubuntu
run: |
wget ${{ env.PYTHON_UBUNTU_STANDALONE_BUILD }} -O python.tar.gz
tar -xvf python.tar.gz
working-directory: core/deps

- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
name: download llvm
run: |
wget https://github.com/llvm/llvm-project/archive/1f27fe6128769f00197925c3b8f6abb9d0e5cd2e.zip
unzip -q 1f27fe6128769f00197925c3b8f6abb9d0e5cd2e.zip
mv llvm-project-1f27fe6128769f00197925c3b8f6abb9d0e5cd2e llvm-project
working-directory: core/deps

- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
name: apply wamr patch
run: |
git init
git config user.email "[email protected]"
git config user.name "github action"
git apply ../../../build-scripts/lldb_wasm.patch
working-directory: core/deps/llvm-project

- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
name: build lldb ubuntu
run: |
echo "start to build lldb..."
mkdir -p wamr-lldb
cmake -S ./llvm -B build \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=../wamr-lldb \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
-DLLVM_TARGETS_TO_BUILD:STRING="X86;WebAssembly" \
-DLLVM_BUILD_BENCHMARKS:BOOL=OFF \
-DLLVM_BUILD_DOCS:BOOL=OFF \
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
-DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
-DLLVM_BUILD_TESTS:BOOL=OFF \
-DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
-DLLVM_INCLUDE_DOCS:BOOL=OFF \
-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
-DLLVM_INCLUDE_TESTS:BOOL=OFF \
-DLLVM_ENABLE_BINDINGS:BOOL=OFF \
-DLLVM_ENABLE_LIBXML2:BOOL=ON \
-DLLVM_ENABLE_LLD:BOOL=ON \
-DLLDB_ENABLE_PYTHON:BOOL=ON \
-DLLDB_EMBED_PYTHON_HOME=ON \
-DLLDB_PYTHON_HOME=.. \
-DLLDB_PYTHON_RELATIVE_PATH=lib/lldb-python \
-DPython3_EXECUTABLE="$(pwd)/../python/bin/python${{ env.PYTHON_VERSION }}"
cmake --build build --target lldb install --parallel $(nproc)
working-directory: core/deps/llvm-project

- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
name: copy lldb to extension folder
run: |
mkdir -p bin
mkdir -p lib
cp ../../../../../../core/deps/llvm-project/lldb/tools/lldb-vscode/package.json ./
cp -r ../../../../../../core/deps/llvm-project/lldb/tools/lldb-vscode/syntaxes/ ./
cp ../../../../../../core/deps/llvm-project/build/bin/lldb* bin
cp ../../../../../../core/deps/llvm-project/build/lib/liblldb*.so lib
cp ../../../../../../core/deps/llvm-project/build/lib/liblldb*.so.* lib
cp -R ../../../../../../core/deps/llvm-project/build/lib/lldb-python lib
cp -R ../../../../../../core/deps/python/lib/python* lib
cp ../../../../../../core/deps/python/lib/libpython${{ env.PYTHON_VERSION }}.so.1.0 lib
working-directory: test-tools/wamr-ide/VSCode-Extension/resource/debug/linux

- name: run tests
timeout-minutes: 5
run: xvfb-run npm run test
working-directory: test-tools/wamr-ide/VSCode-Extension
24 changes: 1 addition & 23 deletions .github/workflows/compilation_on_sgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,28 +291,6 @@ jobs:

- name: run spec tests
run: |
set +e
source /opt/intel/sgxsdk/environment
attempts=0
max_attempts=3

while [ $attempts -lt $max_attempts ]; do
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
exitcode="$?"

if [ $exitcode -eq 0 ]; then
echo "Spec test passed"
exit 0
elif [ $exitcode -ne 143 ]; then
echo "Spec test failed with error code $exitcode"
exit 1
fi

echo "$exitcode is a known GitHub-hosted runner issue"
echo "::notice::Re-running the spec test due to error code 143"
attempts=$((attempts + 1))
done

echo "::notice::Report an error with code 143 in SGX CI after $max_attempts attempts"
exit 143
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
working-directory: ./tests/wamr-test-suites
4 changes: 4 additions & 0 deletions .github/workflows/compilation_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ jobs:
run: ./build.sh
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/

- name: install wget
shell: bash
run: choco install wget

- name: run tests
shell: bash
timeout-minutes: 20
Expand Down
Loading
Loading