|
|
@@ -764,123 +764,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 "action@github.com"
|
|
|
- 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
|