Skip to content

Commit 36f2dcd

Browse files
authored
[Test] Introduce SPM test sample app (#97)
1 parent dc455de commit 36f2dcd

File tree

15 files changed

+927
-0
lines changed

15 files changed

+927
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ bazel_format_virtual_environment/
3333
# SPM
3434
.build/
3535
Package.resolved
36+
.swiftpm/

scripts/build_test_spm_samples.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
## Build gRPC Sample App with Swift Package Manager and Verify Build Success
5+
6+
# build configuration and paths
7+
SAMPLE_PRJ=tests/spm/gRPCSample/gRPCSample.xcodeproj
8+
SCHEME=gRPCSample
9+
DESTINATION='name=iPhone 11'
10+
11+
# custom build flags
12+
BUILD_FLAGS="
13+
GCC_TREAT_WARNINGS_AS_ERRORS=YES
14+
"
15+
16+
# build via xcodebuild command line
17+
time xcodebuild \
18+
-project $SAMPLE_PRJ \
19+
-scheme $SCHEME \
20+
-verbose \
21+
-destination "${DESTINATION}" \
22+
build \
23+
$BUILD_FLAGS

tests/spm/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Overview
2+
3+
This folder contains test targets related to Swift Package Manager distribution of gRPC-iOS

tests/spm/gRPCSample/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Overview
2+
3+
Manually created sample app using gRPC via Swift Package Manager
4+
5+
### Project Settings
6+
7+
* XCode 13.3 (13E113)
8+
* SwiftUI & Swift

tests/spm/gRPCSample/build.xcconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// build.xcconfig
3+
// gRPCSample
4+
//
5+
// Created by Denny Dai on 6/2/22.
6+
//
7+
8+
// Configuration settings file format documentation can be found at:
9+
// https://help.apple.com/xcode/#/dev745c5c974
10+
11+
12+
GCC_TREAT_WARNINGS_AS_ERRORS = YES

0 commit comments

Comments
 (0)