Add test for spm build. (#26178)

pull/26219/head
yulin liang 4 years ago committed by GitHub
parent c90fae35cb
commit 534843d476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      Package.swift
  2. 29
      test/spm_build/test.cc

@ -22,6 +22,8 @@ let package = Package(
dependencies: [
.package(
name: "abseil",
//TODO(yulinliang): Firebase abseil is too old, update the dependency
//when abseil repo supports SPM.
url: "https://github.com/firebase/abseil-cpp-SwiftPM.git",
.revision("05d8107f2971a37e6c77245b7c4c6b0a7e97bc99")
),
@ -140,6 +142,13 @@ let package = Package(
.unsafeFlags(["-Wno-module-import-in-extern-c"]),
]
),
.testTarget(
name: "build-test",
dependencies: [
"gRPC-cpp",
],
path: "test/spm_build"
),
],
cLanguageStandard: .gnu11,
cxxLanguageStandard: .cxx11

@ -0,0 +1,29 @@
/*
*
* Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include "grpcpp/channel.h"
#include "grpcpp/client_context.h"
#include "grpcpp/completion_queue.h"
#include "grpcpp/create_channel.h"
#include "grpcpp/generic/generic_stub.h"
#include "grpcpp/grpcpp.h"
#include "grpcpp/impl/codegen/grpc_library.h"
#include "grpcpp/support/byte_buffer.h"
#include "grpcpp/support/status.h"
#include "grpcpp/support/status_code_enum.h"
#include "grpcpp/support/string_ref.h"
Loading…
Cancel
Save