Skip to content

Commit

Permalink
Fix building with a clean Xcode and add a CI run to ensure just that.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMage committed Jun 4, 2018
1 parent 8ef093b commit 56ecb72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project.xcworkspace
xcuserdata
DerivedData/
.build
build
/protoc-gen-swift
/protoc-gen-swiftgrpc
third_party/**
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ script:
- make test
- make test-plugin
- make test-echo
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make xcodebuild; fi
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ UNAME_S = $(shell uname -s)

ifeq ($(UNAME_S),Linux)
else
CFLAGS = -Xcc -ISources/BoringSSL/include
CFLAGS = -Xcc -ISources/BoringSSL/include -Xlinker -lz
endif

all:
Expand All @@ -11,7 +11,7 @@ all:
cp .build/debug/protoc-gen-swiftgrpc .

project:
swift package generate-xcodeproj
swift package -v $(CFLAGS) generate-xcodeproj
@-ruby fix-project-settings.rb || echo "Consider running 'sudo gem install xcodeproj' to automatically set correct indentation settings for the generated project."

test: all
Expand All @@ -32,9 +32,12 @@ test-plugin:
protoc Sources/Examples/Echo/echo.proto --proto_path=Sources/Examples/Echo --plugin=.build/debug/protoc-gen-swift --plugin=.build/debug/protoc-gen-swiftgrpc --swiftgrpc_out=/tmp --swiftgrpc_opt=TestStubs=true
diff -u /tmp/echo.grpc.swift Sources/Examples/Echo/Generated/echo.grpc.swift

xcodebuild: project
xcodebuild -configuration "Debug" -parallelizeTargets -target SwiftGRPC -target Echo -target Simple -target protoc-gen-swiftgrpc build

clean:
rm -rf Packages
rm -rf .build
rm -rf .build build
rm -rf SwiftGRPC.xcodeproj
rm -rf Package.pins Package.resolved
rm -rf protoc-gen-swift protoc-gen-swiftgrpc
Expand Down

0 comments on commit 56ecb72

Please sign in to comment.