Skip to content

Commit b6033c3

Browse files
Merge branch 'main' into dev/extended_const
2 parents 5629579 + 68d5ae1 commit b6033c3

89 files changed

Lines changed: 2294 additions & 890 deletions

File tree

Some content is hidden

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

.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:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
name: build wamr_wasi_extensions release
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
upload_url:
10+
description: upload binary assets to the URL of release
11+
type: string
12+
required: false
13+
ver_num:
14+
description: a semantic version number. it is required when `release` is true.
15+
type: string
16+
required: false
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build_wamr_wasi_extensions:
23+
runs-on: ${{ matrix.os }}
24+
permissions:
25+
contents: write # for uploading release artifacts
26+
strategy:
27+
matrix:
28+
os: [ubuntu-22.04]
29+
steps:
30+
- name: checkout
31+
uses: actions/checkout@v4
32+
33+
- name: install-wasi-sdk-wabt
34+
uses: ./.github/actions/install-wasi-sdk-wabt
35+
with:
36+
os: ${{ matrix.os }}
37+
38+
- name: Build wamr-wasi-extensions
39+
run: |
40+
mkdir dist
41+
./build_libs.sh $(pwd)/dist/wamr-wasi-extensions
42+
working-directory: wamr-wasi-extensions
43+
44+
- name: Compress the binary
45+
run: |
46+
zip -r wamr-wasi-extensions-${{ inputs.ver_num }}.zip wamr-wasi-extensions
47+
working-directory: wamr-wasi-extensions/dist
48+
49+
- name: Upload release zip
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
upload_url: ${{ inputs.upload_url }}
55+
asset_path: wamr-wasi-extensions/dist/wamr-wasi-extensions-${{ inputs.ver_num }}.zip
56+
asset_name: wamr-wasi-extensions-${{ inputs.ver_num }}.zip
57+
asset_content_type: application/zip

.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.1
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.1
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.1
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

0 commit comments

Comments
 (0)