diff --git a/.github/workflows/validate-swift-package.yaml b/.github/workflows/validate-swift-package.yaml deleted file mode 100644 index 1c62521b..00000000 --- a/.github/workflows/validate-swift-package.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Validate Swift Package - -on: [push, pull_request] - -env: - FORCE_COLOR: true - -jobs: - build: - name: Build - runs-on: macOS-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Build - run: swift build - - test: - name: Test - runs-on: macOS-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Test - run: swift test diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml new file mode 100644 index 00000000..d24ad79b --- /dev/null +++ b/.github/workflows/validate.yaml @@ -0,0 +1,57 @@ +name: Validate + +on: [push, pull_request] + +env: + FORCE_COLOR: true + +jobs: + build: + name: Build + runs-on: macOS-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Build + run: swift build + + test: + name: Test + runs-on: macOS-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Test + run: swift test + + build-swift: + name: Build Swift + runs-on: macOS-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Build + run: swift build + + test-swift: + name: Test Swift + runs-on: macOS-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Test + run: swift test + + build-linux: + name: Build Linux + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Build + run: CC=clang CXX=clang++ bazel build --check_visibility=false //connections:core --spawn_strategy=standalone diff --git a/connections/BUILD b/connections/BUILD index 5fb933e0..b5fed4fd 100644 --- a/connections/BUILD +++ b/connections/BUILD @@ -74,7 +74,6 @@ cc_library( "//internal/platform/implementation/ios:__subpackages__", ], deps = [ - "//connections/clients/windows:types", "//internal/platform:base", "//internal/platform:types", "//internal/platform:util", diff --git a/connections/clients/windows/BUILD b/connections/clients/windows/BUILD index 4083d222..5742b3c4 100644 --- a/connections/clients/windows/BUILD +++ b/connections/clients/windows/BUILD @@ -19,7 +19,7 @@ load( "expand_version_template.bzl", "expand_version_template", ) -load("//tools/build_defs/testing:bzl_library.bzl", "bzl_library") +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") package(default_visibility = ["//location/nearby:__subpackages__"]) @@ -133,6 +133,7 @@ lexan.cc_windows_dll( "core_adapter.h", "dart/core_adapter_dart.h", "discovery_options_w.h", + "dll_config.h", "listeners_w.h", "medium_selector_w.h", "options_base_w.h", diff --git a/connections/implementation/BUILD b/connections/implementation/BUILD index 4e329e19..d95d93f1 100644 --- a/connections/implementation/BUILD +++ b/connections/implementation/BUILD @@ -66,7 +66,7 @@ cc_library( "payload_manager.cc", "pcp_manager.cc", "service_controller_router.cc", - "webrtc_bwu_handler.cc", + "webrtc_bwu_handler_stub.cc", "webrtc_endpoint_channel.cc", "wifi_hotspot_bwu_handler.cc", "wifi_hotspot_endpoint_channel.cc", @@ -107,7 +107,7 @@ cc_library( "service_controller.h", "service_controller_router.h", "service_id_constants.h", - "webrtc_bwu_handler.h", + "webrtc_bwu_handler_stub.h", "webrtc_endpoint_channel.h", "wifi_hotspot_bwu_handler.h", "wifi_hotspot_endpoint_channel.h", diff --git a/connections/implementation/mediums/BUILD b/connections/implementation/mediums/BUILD index afefd618..0d4c4263 100644 --- a/connections/implementation/mediums/BUILD +++ b/connections/implementation/mediums/BUILD @@ -67,12 +67,12 @@ cc_library( name = "utils", srcs = [ "utils.cc", - "webrtc_peer_id.cc", + "webrtc_peer_id_stub.cc", ], hdrs = [ "lost_entity_tracker.h", "utils.h", - "webrtc_peer_id.h", + "webrtc_peer_id_stub.h", "webrtc_socket_stub.h", ], defines = ["NO_WEBRTC"], diff --git a/connections/implementation/mediums/webrtc_stub.h b/connections/implementation/mediums/webrtc_stub.h index 6e62983b..f330e8f5 100644 --- a/connections/implementation/mediums/webrtc_stub.h +++ b/connections/implementation/mediums/webrtc_stub.h @@ -21,7 +21,7 @@ #include #include "connections/implementation/proto/offline_wire_formats.pb.h" -#include "connections/implementation/mediums/webrtc_peer_id.h" +#include "connections/implementation/mediums/webrtc_peer_id_stub.h" #include "connections/implementation/mediums/webrtc_socket_stub.h" #include "internal/platform/cancellation_flag.h" #include "internal/platform/listeners.h" diff --git a/connections/implementation/proto/BUILD b/connections/implementation/proto/BUILD index 8b9d90f3..155b4ada 100644 --- a/connections/implementation/proto/BUILD +++ b/connections/implementation/proto/BUILD @@ -35,6 +35,9 @@ java_lite_proto_library( cc_proto_library( name = "offline_wire_formats_cc_proto", + visibility = [ + "//third_party/nearby:__subpackages__", + ], deps = [ ":offline_wire_formats_proto", ], diff --git a/connections/params.h b/connections/params.h index 2431ae89..01f04e18 100644 --- a/connections/params.h +++ b/connections/params.h @@ -17,7 +17,6 @@ #include -#include "connections/clients/windows/dll_config.h" #include "connections/listeners.h" #include "internal/platform/byte_array.h" diff --git a/internal/platform/BUILD b/internal/platform/BUILD index 3de64cb0..068c3a18 100644 --- a/internal/platform/BUILD +++ b/internal/platform/BUILD @@ -320,7 +320,6 @@ cc_library( ":base", ":logging", ":util", - "//connections/clients/windows:types", "//internal/platform/implementation:platform", "//internal/platform/implementation:types", "@com_google_absl//absl/base:core_headers", diff --git a/internal/platform/file.h b/internal/platform/file.h index 32ee7336..7ba72233 100644 --- a/internal/platform/file.h +++ b/internal/platform/file.h @@ -19,7 +19,6 @@ #include #include -#include "connections/clients/windows/dll_config.h" #include "internal/platform/byte_array.h" #include "internal/platform/exception.h" #include "internal/platform/implementation/input_file.h" diff --git a/internal/platform/implementation/BUILD b/internal/platform/implementation/BUILD index 94e35c44..b08b4040 100644 --- a/internal/platform/implementation/BUILD +++ b/internal/platform/implementation/BUILD @@ -43,7 +43,6 @@ cc_library( "//presence:__subpackages__", ], deps = [ - "//connections/clients/windows:types", "//internal/platform:base", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/strings", diff --git a/presence/proto/credential.proto b/presence/proto/credential.proto index 5b2dc54b..5af8efae 100644 --- a/presence/proto/credential.proto +++ b/presence/proto/credential.proto @@ -2,10 +2,8 @@ syntax = "proto2"; package nearby.presence.proto; -import "third_party/nearby/presence/proto/device_metadata.proto"; +import "presence/proto/device_metadata.proto"; -option cc_api_version = 2; -option java_api_version = 2; option java_package = "com.google.nearby.presence"; enum IdentityType {