Skip to content

Commit 22bdbc7

Browse files
committed
update scripts to sync and use new code layout
1 parent 7a9f1aa commit 22bdbc7

File tree

12 files changed

+282
-2217
lines changed

12 files changed

+282
-2217
lines changed

.github/workflows/post_submit_check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: scripts/prepare_env.sh
2323

2424
- name: gRPC podspec lint checks
25-
run: scripts/lint_test_cocoapod_spec.sh -p native/gRPC.podspec
25+
run: scripts/lint_test_cocoapod_spec.sh -p gRPC.podspec
2626

2727
post-submit-check-cocoapod-lint-gRPC-ProtoRPC:
2828
runs-on: macos-latest
@@ -36,7 +36,7 @@ jobs:
3636
run: scripts/prepare_env.sh
3737

3838
- name: gRPC-ProtoRPC podspec lint checks
39-
run: scripts/lint_test_cocoapod_spec.sh -p native/gRPC-ProtoRPC.podspec
39+
run: scripts/lint_test_cocoapod_spec.sh -p gRPC-ProtoRPC.podspec
4040

4141
post-submit-check-cocoapod-lint-gRPC-RxLibrary:
4242
runs-on: macos-latest
@@ -50,4 +50,4 @@ jobs:
5050
run: scripts/prepare_env.sh
5151

5252
- name: gRPC-RxLibrary podspec lint checks
53-
run: scripts/lint_test_cocoapod_spec.sh -p native/gRPC-RxLibrary.podspec
53+
run: scripts/lint_test_cocoapod_spec.sh -p gRPC-RxLibrary.podspec

.github/workflows/prod_release_cocoapod.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: scripts/prepare_env.sh
2222

2323
- name: Pod release
24-
run: scripts/release_cocoapod.sh native/gRPC-Core.podspec
24+
run: scripts/release_cocoapod.sh gRPC-Core.podspec
2525

2626
- name: Wait for pod avaialble
2727
run: |
@@ -40,7 +40,7 @@ jobs:
4040
run: scripts/prepare_env.sh
4141

4242
- name: Pod release
43-
run: scripts/release_cocoapod.sh native/gRPC-C++.podspec
43+
run: scripts/release_cocoapod.sh gRPC-C++.podspec
4444

4545
- name: Wait for pod avaialble
4646
run: |
@@ -58,7 +58,7 @@ jobs:
5858
run: scripts/prepare_env.sh
5959

6060
- name: Pod release
61-
run: scripts/release_cocoapod.sh native/gRPC-RxLibrary.podspec
61+
run: scripts/release_cocoapod.sh gRPC-RxLibrary.podspec
6262

6363
- name: Wait for pod avaialble
6464
run: |
@@ -78,7 +78,7 @@ jobs:
7878
run: scripts/prepare_env.sh
7979

8080
- name: Pod release
81-
run: scripts/release_cocoapod.sh native/gRPC.podspec
81+
run: scripts/release_cocoapod.sh gRPC.podspec
8282

8383
- name: Wait for pod avaialble
8484
run: |
@@ -98,7 +98,7 @@ jobs:
9898
run: scripts/prepare_env.sh
9999

100100
- name: Pod release
101-
run: scripts/release_cocoapod.sh native/gRPC-ProtoRPC.podspec
101+
run: scripts/release_cocoapod.sh gRPC-ProtoRPC.podspec
102102

103103
- name: Wait for pod avaialble
104104
run: |

Package.swift

Lines changed: 0 additions & 1 deletion
This file was deleted.

Package.swift

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// swift-tools-version:5.5
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
import PackageDescription
4+
import Foundation
5+
6+
var basePath = "."
7+
8+
let package = Package(
9+
name: "gRPC",
10+
defaultLocalization: "en",
11+
products: [
12+
.library(
13+
name: "gRPC-Core",
14+
targets: [
15+
"gRPC-Core",
16+
]
17+
),
18+
.library(
19+
name: "gRPC-cpp",
20+
targets: [
21+
"gRPC-cpp",
22+
]
23+
)
24+
],
25+
26+
dependencies: [
27+
.package(url: "https://github.com/firebase/abseil-cpp-SwiftPM.git", "0.20240116.1"..<"0.20240117.0"),
28+
.package(url: "https://github.com/firebase/boringssl-SwiftPM.git", "0.32.0"..<"0.33.0"),
29+
],
30+
31+
targets: [
32+
.target(
33+
name: "gRPC-Core",
34+
dependencies: [
35+
.product(name:"abseil", package: "abseil-cpp-SwiftPM"),
36+
.product(name:"openssl_grpc", package: "boringssl-SwiftPM"),
37+
],
38+
path: basePath,
39+
exclude: [
40+
"src/objective-c/",
41+
"src/cpp/",
42+
"third_party/upb/upb/port/def.inc",
43+
"third_party/upb/upb/port/undef.inc",
44+
"third_party/re2/LICENSE",
45+
"third_party/utf8_range/LICENSE",
46+
"third_party/xxhash/LICENSE",
47+
"tests",
48+
],
49+
50+
sources: [
51+
"src",
52+
"third_party",
53+
],
54+
resources: [
55+
.copy("src/objective-c/PrivacyInfo.xcprivacy"),
56+
],
57+
publicHeadersPath: "spm-core-include",
58+
cSettings: [
59+
.headerSearchPath("./"),
60+
.headerSearchPath("include/"),
61+
.headerSearchPath("third_party/re2/"),
62+
.headerSearchPath("third_party/upb/"),
63+
.headerSearchPath("third_party/utf8_range/"),
64+
.headerSearchPath("third_party/xxhash/"),
65+
.headerSearchPath("src/core/ext/upb-gen/"),
66+
.headerSearchPath("src/core/ext/upbdefs-gen/"),
67+
.define("GRPC_ARES", to: "0"),
68+
],
69+
linkerSettings: [
70+
.linkedFramework("CoreFoundation"),
71+
.linkedLibrary("z"),
72+
]
73+
),
74+
.target(
75+
name: "gRPC-cpp",
76+
dependencies: [
77+
.product(name:"abseil", package: "abseil-cpp-SwiftPM"),
78+
"gRPC-Core",
79+
],
80+
path: basePath,
81+
exclude: [
82+
"tests",
83+
],
84+
sources: [
85+
"src/cpp/",
86+
],
87+
resources: [
88+
.copy("src/objective-c/PrivacyInfo.xcprivacy"),
89+
],
90+
publicHeadersPath: "spm-cpp-include",
91+
cSettings: [
92+
.headerSearchPath("./"),
93+
.headerSearchPath("include/"),
94+
.headerSearchPath("third_party/upb/"),
95+
.headerSearchPath("src/core/ext/upb-gen"),
96+
]
97+
),
98+
.testTarget(
99+
name: "build-test",
100+
dependencies: [
101+
"gRPC-cpp",
102+
],
103+
path: basePath + "/tests/spm_build"
104+
),
105+
],
106+
cLanguageStandard: .gnu11,
107+
cxxLanguageStandard: .cxx14
108+
)

0 commit comments

Comments
 (0)