Skip to content

Commit e6705b2

Browse files
authored
Merge branch 'main' into static_pgo
2 parents 786877a + 2fe7105 commit e6705b2

52 files changed

Lines changed: 778 additions & 543 deletions

Some content is hidden

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

.github/workflows/build_iwasm_release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ jobs:
137137
- name: compress the binary on non-Windows
138138
if: inputs.runner != 'windows-latest'
139139
run: |
140-
tar czf iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm
140+
# Follow the symlink to the actual binary file
141+
tar --dereference -czf iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm
141142
zip iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm
142143
working-directory: ${{ inputs.cwd }}/build
143144

.github/workflows/build_wamrc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ jobs:
7373
- name: compress the binary on non-Windows
7474
if: inputs.runner != 'windows-latest' && inputs.release
7575
run: |
76-
tar czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc
76+
# Follow the symlink to the actual binary file
77+
tar --dereference -czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc
7778
zip wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip wamrc
7879
working-directory: wamr-compiler/build
7980

.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.28.19
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.28.19
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.28.19
103103
with:
104104
sarif_file: ${{ steps.step1.outputs.sarif-output }}
105105
category: "/language:${{matrix.language}}"

.github/workflows/compilation_on_android_ubuntu.yml

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

665622
steps:
666623
- name: checkout
@@ -682,15 +639,6 @@ jobs:
682639
with:
683640
os: ${{ matrix.os }}
684641

685-
# It is a temporary solution until new wasi-sdk that includes bug fixes is released
686-
- name: build wasi-libc from source
687-
if: matrix.test_option == '$WASI_TEST_OPTIONS'
688-
run: |
689-
git clone https://github.com/WebAssembly/wasi-libc
690-
cd wasi-libc
691-
make -j AR=/opt/wasi-sdk/bin/llvm-ar NM=/opt/wasi-sdk/bin/llvm-nm CC=/opt/wasi-sdk/bin/clang THREAD_MODEL=posix
692-
echo "SYSROOT_PATH=$PWD/sysroot" >> $GITHUB_ENV
693-
694642
- name: set env variable(if llvm are used)
695643
if: matrix.running_mode == 'aot' || matrix.running_mode == 'jit' || matrix.running_mode == 'multi-tier-jit'
696644
run: echo "USE_LLVM=true" >> $GITHUB_ENV
@@ -727,7 +675,7 @@ jobs:
727675

728676
- name: Build WASI thread tests
729677
if: matrix.test_option == '$WASI_TEST_OPTIONS'
730-
run: bash build.sh --sysroot "$SYSROOT_PATH"
678+
run: bash build.sh
731679
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/
732680

733681
- name: build socket api tests
@@ -773,182 +721,3 @@ jobs:
773721
eval $(opam env)
774722
./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
775723
working-directory: ./tests/wamr-test-suites
776-
777-
test-wamr-ide:
778-
needs:
779-
[
780-
build_iwasm
781-
]
782-
runs-on: ubuntu-22.04
783-
env:
784-
PYTHON_VERSION: '3.10'
785-
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
786-
787-
steps:
788-
- name: checkout
789-
uses: actions/checkout@v4
790-
791-
- name: install dependencies
792-
run: |
793-
rustup target add wasm32-wasip1
794-
sudo apt update && sudo apt-get install -y lld ninja-build
795-
npm install
796-
working-directory: test-tools/wamr-ide/VSCode-Extension
797-
798-
- name: code style check
799-
run: |
800-
npm install --save-dev prettier
801-
npm run prettier-format-check
802-
working-directory: test-tools/wamr-ide/VSCode-Extension
803-
804-
- name: build iwasm with source debugging feature
805-
run: |
806-
mkdir build
807-
cd build
808-
cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 -DWAMR_BUILD_REF_TYPES=1
809-
make
810-
working-directory: product-mini/platforms/linux
811-
812-
- name: Cache LLDB
813-
id: cache-lldb
814-
uses: actions/cache@v4
815-
env:
816-
cache-name: cache-lldb-vscode
817-
with:
818-
path: test-tools/wamr-ide/VSCode-Extension/resource/debug/linux
819-
key: ${{ env.cache-name }}-${{ hashFiles('build-scripts/lldb_wasm.patch') }}-${{ env.PYTHON_UBUNTU_STANDALONE_BUILD }}
820-
821-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
822-
name: get stand-alone python ubuntu
823-
run: |
824-
wget ${{ env.PYTHON_UBUNTU_STANDALONE_BUILD }} -O python.tar.gz
825-
tar -xvf python.tar.gz
826-
working-directory: core/deps
827-
828-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
829-
name: download llvm
830-
run: |
831-
wget https://github.com/llvm/llvm-project/archive/1f27fe6128769f00197925c3b8f6abb9d0e5cd2e.zip
832-
unzip -q 1f27fe6128769f00197925c3b8f6abb9d0e5cd2e.zip
833-
mv llvm-project-1f27fe6128769f00197925c3b8f6abb9d0e5cd2e llvm-project
834-
working-directory: core/deps
835-
836-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
837-
name: apply wamr patch
838-
run: |
839-
git init
840-
git config user.email "action@github.com"
841-
git config user.name "github action"
842-
git apply ../../../build-scripts/lldb_wasm.patch
843-
working-directory: core/deps/llvm-project
844-
845-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
846-
name: build lldb ubuntu
847-
run: |
848-
echo "start to build lldb..."
849-
mkdir -p wamr-lldb
850-
cmake -S ./llvm -B build \
851-
-G Ninja \
852-
-DCMAKE_INSTALL_PREFIX=../wamr-lldb \
853-
-DCMAKE_BUILD_TYPE:STRING="Release" \
854-
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
855-
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
856-
-DLLVM_TARGETS_TO_BUILD:STRING="X86;WebAssembly" \
857-
-DLLVM_BUILD_BENCHMARKS:BOOL=OFF \
858-
-DLLVM_BUILD_DOCS:BOOL=OFF \
859-
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
860-
-DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
861-
-DLLVM_BUILD_TESTS:BOOL=OFF \
862-
-DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
863-
-DLLVM_INCLUDE_DOCS:BOOL=OFF \
864-
-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
865-
-DLLVM_INCLUDE_TESTS:BOOL=OFF \
866-
-DLLVM_ENABLE_BINDINGS:BOOL=OFF \
867-
-DLLVM_ENABLE_LIBXML2:BOOL=ON \
868-
-DLLVM_ENABLE_LLD:BOOL=ON \
869-
-DLLDB_ENABLE_PYTHON:BOOL=ON \
870-
-DLLDB_EMBED_PYTHON_HOME=ON \
871-
-DLLDB_PYTHON_HOME=.. \
872-
-DLLDB_PYTHON_RELATIVE_PATH=lib/lldb-python \
873-
-DPython3_EXECUTABLE="$(pwd)/../python/bin/python${{ env.PYTHON_VERSION }}"
874-
cmake --build build --target lldb install --parallel $(nproc)
875-
working-directory: core/deps/llvm-project
876-
877-
- if: ${{ steps.cache-lldb.outputs.cache-hit != 'true' }}
878-
name: copy lldb to extension folder
879-
run: |
880-
mkdir -p bin
881-
mkdir -p lib
882-
cp ../../../../../../core/deps/llvm-project/lldb/tools/lldb-vscode/package.json ./
883-
cp -r ../../../../../../core/deps/llvm-project/lldb/tools/lldb-vscode/syntaxes/ ./
884-
cp ../../../../../../core/deps/llvm-project/build/bin/lldb* bin
885-
cp ../../../../../../core/deps/llvm-project/build/lib/liblldb*.so lib
886-
cp ../../../../../../core/deps/llvm-project/build/lib/liblldb*.so.* lib
887-
cp -R ../../../../../../core/deps/llvm-project/build/lib/lldb-python lib
888-
cp -R ../../../../../../core/deps/python/lib/python* lib
889-
cp ../../../../../../core/deps/python/lib/libpython${{ env.PYTHON_VERSION }}.so.1.0 lib
890-
working-directory: test-tools/wamr-ide/VSCode-Extension/resource/debug/linux
891-
892-
- name: run tests
893-
timeout-minutes: 5
894-
run: xvfb-run npm run test
895-
working-directory: test-tools/wamr-ide/VSCode-Extension
896-
897-
run_coremark_pgo:
898-
needs:
899-
[
900-
build_wamrc,
901-
build_llvm_libraries_on_ubuntu_2204,
902-
]
903-
runs-on: ubuntu-22.04
904-
steps:
905-
- name: checkout
906-
uses: actions/checkout@v4
907-
908-
- name: Install llvm-profdata-18
909-
run: |
910-
sudo apt-get update
911-
sudo apt-get install -y wget gnupg software-properties-common
912-
wget https://apt.llvm.org/llvm.sh
913-
chmod +x llvm.sh
914-
sudo ./llvm.sh 18
915-
sudo ln -sf /usr/bin/llvm-profdata-18 /usr/local/bin/llvm-profdata
916-
917-
- name: install-wasi-sdk-wabt
918-
uses: ./.github/actions/install-wasi-sdk-wabt
919-
with:
920-
os: ubuntu-22.04
921-
922-
- name: Get LLVM libraries
923-
uses: actions/cache@v4
924-
with:
925-
path: |
926-
./core/deps/llvm/build/bin
927-
./core/deps/llvm/build/include
928-
./core/deps/llvm/build/lib
929-
./core/deps/llvm/build/libexec
930-
./core/deps/llvm/build/share
931-
key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
932-
fail-on-cache-miss: true
933-
934-
- name: Build wamrc
935-
run: |
936-
mkdir build && cd build
937-
cmake ..
938-
cmake --build . --config Release --parallel 4
939-
working-directory: wamr-compiler
940-
941-
- name: Build iwasm with static PGO
942-
run: |
943-
mkdir build && cd build
944-
cmake .. -DWAMR_BUILD_STATIC_PGO=1
945-
cmake --build . --config Release --parallel 4
946-
working-directory: product-mini/platforms/linux
947-
948-
- name: Build CoreMark benchmark
949-
run: ./build.sh
950-
working-directory: tests/benchmarks/coremark
951-
952-
- name: Run CoreMark PGO test
953-
run: ./test_pgo.sh
954-
working-directory: tests/benchmarks/coremark

0 commit comments

Comments
 (0)