Merge branch main into dev/wasi-libc-windows

This commit is contained in:
Wenyong Huang
2023-10-08 15:03:35 +08:00
151 changed files with 5909 additions and 2046 deletions

View File

@ -16,7 +16,7 @@ concurrency:
jobs:
compliance_job:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3

View File

@ -65,6 +65,7 @@ env:
THREADS_TEST_OPTIONS: "-s spec -b -p -P"
X86_32_TARGET_TEST_OPTIONS: "-m x86_32 -P"
WASI_TEST_OPTIONS: "-s wasi_certification -w"
WAMR_COMPILER_TEST_OPTIONS: "-s wamr_compiler -b -P"
jobs:
build_llvm_libraries_on_ubuntu_2204:
@ -72,7 +73,7 @@ jobs:
with:
os: "ubuntu-22.04"
arch: "X86"
build_wamrc:
needs:
[build_llvm_libraries_on_ubuntu_2204]
@ -150,9 +151,7 @@ jobs:
exclude:
# uncompatiable feature and platform
# uncompatiable mode and feature
# MULTI_MODULE only on INTERP mode
- make_options_run_mode: $AOT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
# MULTI_MODULE only on INTERP mode and AOT mode
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
@ -241,6 +240,14 @@ jobs:
cmake --build . --config Release --parallel 4
working-directory: product-mini/platforms/${{ matrix.platform }}
- name: Build and run unit tests
run: |
mkdir build-unittests && cd build-unittests
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }}
cmake --build . --config Release --parallel 4
ctest
working-directory: tests/unit
build_samples_wasm_c_api:
needs:
[
@ -320,7 +327,12 @@ jobs:
working-directory: samples/wasm-c-api
build_samples_others:
needs: [build_iwasm]
needs:
[
build_iwasm,
build_llvm_libraries_on_ubuntu_2204,
build_wamrc,
]
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -333,6 +345,9 @@ jobs:
[
"https://github.com/WebAssembly/wabt/releases/download/1.0.31/wabt-1.0.31-ubuntu.tar.gz",
]
include:
- os: ubuntu-22.04
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
steps:
- name: checkout
uses: actions/checkout@v3
@ -350,7 +365,23 @@ jobs:
sudo wget ${{ matrix.wabt_release }}
sudo tar -xzf wabt-1.0.31-*.tar.gz
sudo mv wabt-1.0.31 wabt
- name: Get LLVM libraries
id: retrieve_llvm_libs
uses: actions/cache@v3
with:
path: |
./core/deps/llvm/build/bin
./core/deps/llvm/build/include
./core/deps/llvm/build/lib
./core/deps/llvm/build/libexec
./core/deps/llvm/build/share
key: ${{ matrix.llvm_cache_key }}
- name: Build wamrc
run: |
mkdir build && cd build
cmake ..
cmake --build . --config Release --parallel 4
working-directory: wamr-compiler
- name: Build Sample [basic]
run: |
cd samples/basic
@ -377,9 +408,10 @@ jobs:
run: |
cd samples/multi-module
mkdir build && cd build
cmake ..
cmake .. -DWAMR_BUILD_AOT=1
cmake --build . --config Release --parallel 4
./multi_module
./multi_module mC.wasm
./multi_module mC.aot
- name: Build Sample [spawn-thread]
run: |
@ -449,6 +481,10 @@ jobs:
- os: ubuntu-22.04
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
ubuntu_version: "22.04"
- os: ubuntu-22.04
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
running_mode: aot
test_option: $WAMR_COMPILER_TEST_OPTIONS
exclude:
# uncompatiable modes and features
# classic-interp and fast-interp don't support simd
@ -456,9 +492,7 @@ jobs:
test_option: $SIMD_TEST_OPTIONS
- running_mode: "fast-interp"
test_option: $SIMD_TEST_OPTIONS
# aot and jit don't support multi module
- running_mode: "aot"
test_option: $MULTI_MODULES_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
@ -483,7 +517,7 @@ jobs:
sudo tar -xzf wasi-sdk-*.tar.gz
sudo mv wasi-sdk-20.0 wasi-sdk
# It is a temporary solution until new wasi-sdk that includes bug fixes is released
# It is a temporary solution until new wasi-sdk that includes bug fixes is released
- name: build wasi-libc from source
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: |

View File

@ -133,13 +133,11 @@ jobs:
exclude:
# uncompatiable feature and platform
# uncompatiable mode and feature
# MULTI_MODULE only on INTERP mode
# MULTI_MODULE only on INTERP mode and AOT mode
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
- make_options_run_mode: $AOT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
# SIMD only on JIT/AOT mode
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_SIMD=1"
@ -245,7 +243,7 @@ jobs:
working-directory: samples/wasm-c-api
build_samples_others:
needs: [build_iwasm]
needs: [build_iwasm, build_wamrc]
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -304,7 +302,7 @@ jobs:
mkdir build && cd build
cmake ..
cmake --build . --config Release --parallel 4
./multi_module
./multi_module mC.wasm
- name: Build Sample [spawn-thread]
run: |

View File

@ -101,9 +101,6 @@ jobs:
platform: [linux-sgx]
exclude:
# uncompatiable mode and feature
# MULTI_MODULE only on INTERP mode
- make_options_run_mode: $AOT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
# MINI_LOADER only on INTERP mode
- make_options_run_mode: $AOT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"

View File

@ -8,9 +8,11 @@ on:
types:
- opened
- synchronize
#running nightly pipeline if you're changing it
# running nightly pipeline if you're changing it
# stress tests are run only in nightly at the moment, so running them in they are changed
paths:
- ".github/workflows/nightly_run.yml"
- "core/iwasm/libraries/lib-wasi-threads/stress-test/**"
# midnight UTC
schedule:
@ -125,9 +127,7 @@ jobs:
exclude:
# uncompatiable feature and platform
# uncompatiable mode and feature
# MULTI_MODULE only on INTERP mode
- make_options_run_mode: $AOT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
# MULTI_MODULE only on INTERP mode and AOT mode
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
@ -250,7 +250,7 @@ jobs:
exclude:
# uncompatiable feature and platform
# uncompatiable mode and feature
# MULTI_MODULE only on INTERP mode
# MULTI_MODULE only on INTERP mode and AOT mode
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
# SIMD only on JIT/AOT mode
@ -380,7 +380,12 @@ jobs:
working-directory: samples/wasm-c-api
build_samples_others:
needs: [build_iwasm]
needs:
[
build_iwasm,
build_llvm_libraries_on_ubuntu_2004,
build_wamrc,
]
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -393,6 +398,9 @@ jobs:
[
"https://github.com/WebAssembly/wabt/releases/download/1.0.31/wabt-1.0.31-ubuntu.tar.gz",
]
include:
- os: ubuntu-20.04
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2004.outputs.cache_key }}
steps:
- name: checkout
uses: actions/checkout@v3
@ -409,6 +417,26 @@ jobs:
sudo wget ${{ matrix.wabt_release }}
sudo tar -xzf wabt-1.0.31-*.tar.gz
sudo mv wabt-1.0.31 wabt
- name: Get LLVM libraries
id: retrieve_llvm_libs
uses: actions/cache@v3
with:
path: |
./core/deps/llvm/build/bin
./core/deps/llvm/build/include
./core/deps/llvm/build/lib
./core/deps/llvm/build/libexec
./core/deps/llvm/build/share
key: ${{ matrix.llvm_cache_key }}
- name: Build wamrc
run: |
mkdir build && cd build
cmake -D WAMR_BUILD_SANITIZER="${{matrix.sanitizer}}" ..
cmake --build . --config Release --parallel 4
working-directory: wamr-compiler
- name: Build Sample [basic]
run: |
cd samples/basic
@ -432,9 +460,10 @@ jobs:
run: |
cd samples/multi-module
mkdir build && cd build
cmake ..
cmake .. -DWAMR_BUILD_AOT=1
cmake --build . --config Release --parallel 4
./multi_module
./multi_module mC.wasm
./multi_module mC.aot
- name: Build Sample [spawn-thread]
run: |
cd samples/spawn-thread
@ -522,9 +551,7 @@ jobs:
test_option: $SIMD_TEST_OPTIONS
- running_mode: "fast-interp"
test_option: $SIMD_TEST_OPTIONS
# aot and jit don't support multi module
- running_mode: "aot"
test_option: $MULTI_MODULES_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
@ -599,6 +626,11 @@ jobs:
run: bash build.sh --sysroot "$SYSROOT_PATH"
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/
- name: Build WASI thread stress tests
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: bash build.sh --sysroot "$SYSROOT_PATH"
working-directory: ./core/iwasm/libraries/lib-wasi-threads/stress-test/
- name: build socket api tests
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: bash build.sh
@ -624,4 +656,4 @@ jobs:
timeout-minutes: 40
if: env.TEST_ON_X86_32 == 'true'
run: ./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
working-directory: ./tests/wamr-test-suites
working-directory: ./tests/wamr-test-suites