From 45ec154f5d204bed9ac09c2d9a690ebf8837af25 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Fri, 23 Aug 2024 15:26:49 +0000 Subject: [PATCH 1/8] Remove wasmtime windows from CI and test other engines Signed-off-by: Keith Mattix II --- .github/workflows/test.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 66ec91bf..a6ae8720 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -260,9 +260,23 @@ jobs: os: macos-13 arch: x86_64 action: test - - name: 'Wasmtime on Windows/x86_64' - engine: 'wasmtime' - repo: 'com_github_bytecodealliance_wasmtime' + - name: 'WAVM on Windows/x86_64' + engine: 'wavm' + repo: 'com_github_wavm_wavm' + os: windows-2019 + arch: x86_64 + action: test + targets: -//test/fuzz/... + - name: 'WAMR on Windows/x86_64' + engine: 'wamr' + repo: 'com_github_bytecodealliance_wasm_micro_runtime' + os: windows-2019 + arch: x86_64 + action: test + targets: -//test/fuzz/... + - name: 'WasmEdge on Windows/x86_64' + engine: 'wasmedge' + repo: 'com_github_wasmedge_wasmedge' os: windows-2019 arch: x86_64 action: test From 4b834df83804373df9c39dabec839a825249e737 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Sat, 24 Aug 2024 14:15:32 +0000 Subject: [PATCH 2/8] Bump rules_foreign_cc and try all engines on Windows again Signed-off-by: Keith Mattix II --- .github/workflows/test.yml | 18 ++++++++++++++++-- bazel/repositories.bzl | 6 +++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6ae8720..f571b9c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -260,6 +260,13 @@ jobs: os: macos-13 arch: x86_64 action: test + - name: 'Wasmtime on Windows/x86_64' + engine: 'wasmtime' + repo: 'com_github_bytecodealliance_wasmtime' + os: windows-2019 + arch: x86_64 + action: test + targets: -//test/fuzz/... - name: 'WAVM on Windows/x86_64' engine: 'wavm' repo: 'com_github_wavm_wavm' @@ -267,8 +274,15 @@ jobs: arch: x86_64 action: test targets: -//test/fuzz/... - - name: 'WAMR on Windows/x86_64' - engine: 'wamr' + - name: 'WAMR JIT on Windows/x86_64' + engine: 'wamr-jit' + repo: 'com_github_bytecodealliance_wasm_micro_runtime' + os: windows-2019 + arch: x86_64 + action: test + targets: -//test/fuzz/... + - name: 'WAMR Interp on Windows/x86_64' + engine: 'wamr-interp' repo: 'com_github_bytecodealliance_wasm_micro_runtime' os: windows-2019 arch: x86_64 diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 2586ed21..7c6b4600 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -69,9 +69,9 @@ def proxy_wasm_cpp_host_repositories(): maybe( http_archive, name = "rules_foreign_cc", - sha256 = "bcd0c5f46a49b85b384906daae41d277b3dc0ff27c7c752cc51e43048a58ec83", - strip_prefix = "rules_foreign_cc-0.7.1", - url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.7.1.tar.gz", + sha256 = "a2e6fb56e649c1ee79703e99aa0c9d13c6cc53c8d7a0cbb8797ab2888bbc99a3", + strip_prefix = "rules_foreign_cc-0.12.0", + url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.12.0.tar.gz", ) maybe( From e6ac09a50618b1d4475f9b4cbd9c2e1554121218 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Sun, 25 Aug 2024 13:47:24 +0000 Subject: [PATCH 3/8] Stash Signed-off-by: Keith Mattix II --- bazel/dependencies_import.bzl | 2 -- 1 file changed, 2 deletions(-) diff --git a/bazel/dependencies_import.bzl b/bazel/dependencies_import.bzl index 1f23f7d0..c801055c 100644 --- a/bazel/dependencies_import.bzl +++ b/bazel/dependencies_import.bzl @@ -13,12 +13,10 @@ # limitations under the License. load("@fuzzing_py_deps//:requirements.bzl", pip_fuzzing_dependencies = "install_deps") -load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") load("@rules_fuzzing//fuzzing:repositories.bzl", "rules_fuzzing_dependencies") load("@v8_python_deps//:requirements.bzl", pip_v8_dependencies = "install_deps") def proxy_wasm_cpp_host_dependencies_import(): - rules_foreign_cc_dependencies() rules_fuzzing_dependencies() pip_fuzzing_dependencies() From 3344120e6de6ef07309fac4a2cf52fbe620fa691 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Sun, 25 Aug 2024 21:55:12 -0400 Subject: [PATCH 4/8] Reorganize imports Signed-off-by: Keith Mattix II --- WORKSPACE | 11 +++++++++-- bazel/repositories.bzl | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index dad42c2f..cd3e04cf 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,8 +1,15 @@ workspace(name = "proxy_wasm_cpp_host") -load("@proxy_wasm_cpp_host//bazel:repositories.bzl", "proxy_wasm_cpp_host_repositories") +load("@proxy_wasm_cpp_host//bazel:repositories.bzl", "proxy_wasm_cpp_host_base_repositories", "proxy_wasm_cpp_host_engine_repositories") -proxy_wasm_cpp_host_repositories() +proxy_wasm_cpp_host_base_repositories() + +# Now that rules_foreign_cc was loaded above, we can pull in all of the dependencies we need +load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") + +rules_foreign_cc_dependencies() + +proxy_wasm_cpp_host_engine_repositories() load("@proxy_wasm_cpp_host//bazel:dependencies.bzl", "proxy_wasm_cpp_host_dependencies") diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 7c6b4600..7646a170 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -16,7 +16,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_r load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -def proxy_wasm_cpp_host_repositories(): +def proxy_wasm_cpp_host_base_repositories(): # Bazel extensions. # Update platforms for crate_universe. Can remove when we update Bazel version. @@ -157,6 +157,7 @@ def proxy_wasm_cpp_host_repositories(): url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz", ) +def proxy_wasm_cpp_host_engine_repositories(): # V8 with dependencies. maybe( From 337701f2c8a09a0e885655c790ca213e443b2cb6 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Mon, 26 Aug 2024 14:37:07 +0000 Subject: [PATCH 5/8] Work through the bazel issues Signed-off-by: Keith Mattix II --- WORKSPACE | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index cd3e04cf..2f0601c5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -9,6 +9,11 @@ load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_depende rules_foreign_cc_dependencies() +# Need to load bazel_features deps as well (now that we've pulled in rules_foreign_cc_deps) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + proxy_wasm_cpp_host_engine_repositories() load("@proxy_wasm_cpp_host//bazel:dependencies.bzl", "proxy_wasm_cpp_host_dependencies") From 384217e3825f17a90b53407315e4eacf427487cc Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Mon, 26 Aug 2024 15:41:06 +0000 Subject: [PATCH 6/8] Try to fix windows long paths Signed-off-by: Keith Mattix II --- .bazelrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelrc b/.bazelrc index ab9a27f8..087993ce 100644 --- a/.bazelrc +++ b/.bazelrc @@ -88,3 +88,4 @@ build:windows --cxxopt="/std:c++17" # Enable symlinks and runfiles on Windows (enabled by default on other platforms). startup --windows_enable_symlinks build:windows --enable_runfiles +build:windows --output_user_root=C:/_bzl From 392b3a3c87f7a965ece52f17134d6a1e18cb8d58 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Mon, 26 Aug 2024 16:14:06 +0000 Subject: [PATCH 7/8] No windows only option.... Signed-off-by: Keith Mattix II --- .bazelrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index 087993ce..ab9a27f8 100644 --- a/.bazelrc +++ b/.bazelrc @@ -88,4 +88,3 @@ build:windows --cxxopt="/std:c++17" # Enable symlinks and runfiles on Windows (enabled by default on other platforms). startup --windows_enable_symlinks build:windows --enable_runfiles -build:windows --output_user_root=C:/_bzl From 0a8f6d8b91534f31412a75585f2e60b608f0d933 Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Mon, 26 Aug 2024 22:02:57 +0000 Subject: [PATCH 8/8] Remove windows from CI Signed-off-by: Keith Mattix II --- .github/workflows/test.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f571b9c0..13264d48 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -260,41 +260,6 @@ jobs: os: macos-13 arch: x86_64 action: test - - name: 'Wasmtime on Windows/x86_64' - engine: 'wasmtime' - repo: 'com_github_bytecodealliance_wasmtime' - os: windows-2019 - arch: x86_64 - action: test - targets: -//test/fuzz/... - - name: 'WAVM on Windows/x86_64' - engine: 'wavm' - repo: 'com_github_wavm_wavm' - os: windows-2019 - arch: x86_64 - action: test - targets: -//test/fuzz/... - - name: 'WAMR JIT on Windows/x86_64' - engine: 'wamr-jit' - repo: 'com_github_bytecodealliance_wasm_micro_runtime' - os: windows-2019 - arch: x86_64 - action: test - targets: -//test/fuzz/... - - name: 'WAMR Interp on Windows/x86_64' - engine: 'wamr-interp' - repo: 'com_github_bytecodealliance_wasm_micro_runtime' - os: windows-2019 - arch: x86_64 - action: test - targets: -//test/fuzz/... - - name: 'WasmEdge on Windows/x86_64' - engine: 'wasmedge' - repo: 'com_github_wasmedge_wasmedge' - os: windows-2019 - arch: x86_64 - action: test - targets: -//test/fuzz/... - name: 'WAVM on Linux/x86_64' engine: 'wavm' repo: 'com_github_wavm_wavm'