From 2b30bb0fdac0a403c27c579c64a46af80068d479 Mon Sep 17 00:00:00 2001 From: "liang.he" Date: Tue, 22 Aug 2023 13:57:23 +0800 Subject: [PATCH 1/2] Upgrade swig to 4.1 (#2491) Upgrade to sig@4.1 when building wamr-lldb on MacOS since swig@3 had been disabled: https://formulae.brew.sh/formula/swig --- .github/workflows/build_wamr_lldb.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wamr_lldb.yml b/.github/workflows/build_wamr_lldb.yml index e0f9595c78..b7971aa89d 100644 --- a/.github/workflows/build_wamr_lldb.yml +++ b/.github/workflows/build_wamr_lldb.yml @@ -27,7 +27,7 @@ on: type: string required: false default: "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz" - + jobs: try_reuse: @@ -49,7 +49,7 @@ jobs: PYTHON_MACOS_STANDALONE_BUILD: https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11+20230507-x86_64-apple-darwin-install_only.tar.gz steps: - uses: actions/checkout@v3 - + - name: download and install wasi-sdk run: | cd /opt @@ -84,8 +84,8 @@ jobs: if: steps.lldb_build_cache.outputs.cache-hit != 'true' && contains(inputs.runner, 'macos') run: | brew remove swig - brew install swig@3 cmake ninja libedit - brew link --overwrite swig@3 + brew install swig@4.1 cmake ninja libedit + brew link --overwrite swig@4.1 sudo rm -rf /Library/Developer/CommandLineTools - name: install utils ubuntu @@ -205,7 +205,7 @@ jobs: mkdir -p wamr-lldb/lib cp build/bin/lldb* wamr-lldb/bin cp lldb/tools/lldb-vscode/package.json wamr-lldb - cp -r lldb/tools/lldb-vscode/syntaxes/ wamr-lldb + cp -r lldb/tools/lldb-vscode/syntaxes/ wamr-lldb working-directory: core/deps/llvm-project - name: pack ubuntu specific libraries @@ -226,7 +226,7 @@ jobs: cp -R ../python/lib/python* wamr-lldb/lib cp ../python/lib/libpython*.dylib wamr-lldb/lib install_name_tool -change /install/lib/libpython${{ env.PYTHON_VERSION }}.dylib @rpath/libpython${{ env.PYTHON_VERSION }}.dylib wamr-lldb/lib/liblldb.*.dylib - # Patch path of python library -> https://github.com/indygreg/python-build-standalone/blob/85923ca3911784e6978b85d56e06e9ae75cb2dc4/docs/quirks.rst?plain=1#L412-L446 + # Patch path of python library -> https://github.com/indygreg/python-build-standalone/blob/85923ca3911784e6978b85d56e06e9ae75cb2dc4/docs/quirks.rst?plain=1#L412-L446 working-directory: core/deps/llvm-project - name: compress the binary From 377c3d7a38aeb9cb26be231408432cc2369300eb Mon Sep 17 00:00:00 2001 From: Xu Jun Date: Tue, 22 Aug 2023 14:24:42 +0800 Subject: [PATCH 2/2] Auto increase port number in lldb validation script (#2492) --- ci/validate_lldb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/validate_lldb.py b/ci/validate_lldb.py index 0bf743c0f1..1b431ada85 100755 --- a/ci/validate_lldb.py +++ b/ci/validate_lldb.py @@ -32,7 +32,6 @@ options = parser.parse_args() -lldb_command_prologue = f'{options.lldb} -o "process connect -p wasm connect://127.0.0.1:{options.port}"' lldb_command_epilogue = '-o q' test_cases = { @@ -64,8 +63,13 @@ def print_process_output(p): print("Failed to get process output") # Step2: Launch WAMR in debug mode and validate lldb commands -wamr_cmd = f'{options.wamr} -g=127.0.0.1:{options.port} {WASM_OUT_FILE}' + +iteration = 0 for case, cmd in test_cases.items(): + lldb_command_prologue = f'{options.lldb} -o "process connect -p wasm connect://127.0.0.1:{int(options.port) + iteration}"' + wamr_cmd = f'{options.wamr} -g=127.0.0.1:{int(options.port) + iteration} {WASM_OUT_FILE}' + iteration += 1 + has_error = False print(f'validating case [{case}] ...', end='', flush=True) lldb_cmd = f'{lldb_command_prologue} {cmd} {lldb_command_epilogue}'