Enable Windows CI

PiperOrigin-RevId: 526638532
pull/13171/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent ec75a3cbb6
commit 9fa51d0bc9
  1. 3
      .github/workflows/bazel_tests.yml
  2. 4
      bazel/workspace_deps.bzl
  3. 7
      upbc/upbdev.c

@ -28,8 +28,7 @@ jobs:
- { NAME: "UBSAN", BAZEL: bazel, CC: clang, os: ubuntu-20-large, flags: "--config=ubsan -c dbg -- -benchmarks:benchmark -python/... -lua/...", install: "libunwind-dev" } - { NAME: "UBSAN", BAZEL: bazel, CC: clang, os: ubuntu-20-large, flags: "--config=ubsan -c dbg -- -benchmarks:benchmark -python/... -lua/...", install: "libunwind-dev" }
- { NAME: "32-bit", BAZEL: bazel, CC: clang, os: ubuntu-20-large, flags: "--copt=-m32 --linkopt=-m32 -- -... benchmarks:benchmark ", install: "g++-multilib" } - { NAME: "32-bit", BAZEL: bazel, CC: clang, os: ubuntu-20-large, flags: "--copt=-m32 --linkopt=-m32 -- -... benchmarks:benchmark ", install: "g++-multilib" }
- { NAME: "macOS", BAZEL: bazel, CC: clang, os: macos-11 } - { NAME: "macOS", BAZEL: bazel, CC: clang, os: macos-11 }
# TODO(b/277357519): fix the Windows test. - { NAME: "Windows", BAZEL: bazel, os: windows-2019, startup-flags: "--output_user_root=C:/tmp", flags: "--config=cpp17_msvc", targets: "upb/... upbc/... python/... protos/... protos_generator/..." }
# - { NAME: "Windows", BAZEL: bazel, os: windows-2019, startup-flags: "--output_user_root=C:/tmp", flags: "--config=cpp17_msvc", targets: "upb/... upbc/... python/... protos/... protos_generator/..." }
# We support two Bazel versions back per https://opensource.google/documentation/policies/cplusplus-support # We support two Bazel versions back per https://opensource.google/documentation/policies/cplusplus-support
- { NAME: "Bazel 4.1.0", BAZEL: bazel-4.1.0-linux-x86_64, CC: clang, os: ubuntu-20-large } - { NAME: "Bazel 4.1.0", BAZEL: bazel-4.1.0-linux-x86_64, CC: clang, os: ubuntu-20-large }
- { NAME: "Bazel 5.3.0", BAZEL: bazel-5.3.0-linux-x86_64, CC: clang, os: ubuntu-20-large } - { NAME: "Bazel 5.3.0", BAZEL: bazel-5.3.0-linux-x86_64, CC: clang, os: ubuntu-20-large }

@ -23,8 +23,8 @@ def upb_deps():
_github_archive, _github_archive,
name = "com_google_protobuf", name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf", repo = "https://github.com/protocolbuffers/protobuf",
commit = "13833b1df01b811c6b0a3a2c83864579d740050f", commit = "f71dc953c77f164523c23e7c2485ccc49ada3c2e",
sha256 = "b029d1a5f84b3f0f424f7524101e3104fae8c59bb3a6104b9cec451b14b3d3e8", sha256 = "e4ea58f01e8fa6ce920449d70a220be4d5f2e9a4f77123e3595c72bd60a34987",
patches = ["@upb//bazel:protobuf.patch"], patches = ["@upb//bazel:protobuf.patch"],
) )

@ -25,7 +25,14 @@
#include "upbc/upbdev.h" #include "upbc/upbdev.h"
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#else // _WIN32
#include <unistd.h> #include <unistd.h>
#endif // !_WIN32
#include "google/protobuf/compiler/plugin.upb.h" #include "google/protobuf/compiler/plugin.upb.h"
#include "google/protobuf/compiler/plugin.upbdefs.h" #include "google/protobuf/compiler/plugin.upbdefs.h"

Loading…
Cancel
Save