Skip to content

Commit

Permalink
Travis-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyxo committed Nov 4, 2014
1 parent 1cf534d commit 4c3ce61
Show file tree
Hide file tree
Showing 11 changed files with 359 additions and 30 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: objective-c
osx_image: xcode61
before_install:
- brew update
- brew unlink xctool
- brew install xctool --HEAD
- xctool -v
- brew install automake
- brew unlink libtool
- brew install libtool
- brew install protobuf
- ./scripts/build.sh
- ./travis/travis.sh
script: xctool -project ./src/ProtocolBuffers/ProtocolBuffers.xcodeproj -sdk iphonesimulator -scheme ProtocolBuffers build test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Protocol Buffers for Swift

[![Build Status](https://travis-ci.org/alexeyxo/protobuf-swift.svg?branch=master)](https://travis-ci.org/alexeyxo/protobuf-swift)
[![Platform](http://img.shields.io/badge/platform-ios%20%7C%20osx-green.svg)](https://github.com/alexeyxo/protobuf-swift)
[![Release](http://img.shields.io/github/tag/alexeyxo/protobuf-swift.svg)](https://github.com/alexeyxo/protobuf-swift/releases/tag/v1.0)

Expand All @@ -24,7 +24,7 @@ This project is based on an implementation of Protocol Buffers from Google. See

5.`git clone [email protected]:alexeyxo/protobuf-swift.git`

6.`./build.sh`
6.`./scripts/build.sh`

7.Add `./src/ProtocolBuffers/ProtocolBuffers.xcodeproj` in your project.

Expand Down
4 changes: 2 additions & 2 deletions build.sh → scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
make clean;
./autogen.sh;
./configure CXXFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib;
./autogen.sh && \
./configure CXXFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib && \
make -j8 && make install;
2 changes: 2 additions & 0 deletions scripts/makeDescriptor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
cd src/ && protoc compiler/swift-descriptor.proto --cpp_out="./" && cd ..;
1 change: 1 addition & 0 deletions src/compiler/makeTests.sh → scripts/makeTests.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cd src/compiler
protoc google/protobuf/unittest*.proto --swift_out="./Tests";
protoc google/protobuf/descriptor*.proto --swift_out="./Tests";
cp -f ./Tests/* ../ProtocolBuffers/ProtocolBuffersTests/pbTests/;
Expand Down
16 changes: 16 additions & 0 deletions src/ProtocolBuffers/ProtocolBuffers.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
3F1422981A07FDBF0090CEE9 /* ProtocolBuffers.framework in Copy Framework */ = {isa = PBXBuildFile; fileRef = 3F85569919C71BCF003802F2 /* ProtocolBuffers.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
3F181E1319D1D83900F7FA0D /* AbstractMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F181E0619D1D83900F7FA0D /* AbstractMessage.swift */; };
3F181E1419D1D83900F7FA0D /* CodedInputStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F181E0719D1D83900F7FA0D /* CodedInputStream.swift */; };
3F181E1519D1D83900F7FA0D /* CodedOutputStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F181E0819D1D83900F7FA0D /* CodedOutputStream.swift */; };
Expand Down Expand Up @@ -54,6 +55,20 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
3F1422971A07FD990090CEE9 /* Copy Framework */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
3F1422981A07FDBF0090CEE9 /* ProtocolBuffers.framework in Copy Framework */,
);
name = "Copy Framework";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
3F181E0619D1D83900F7FA0D /* AbstractMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AbstractMessage.swift; sourceTree = "<group>"; };
3F181E0719D1D83900F7FA0D /* CodedInputStream.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodedInputStream.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -250,6 +265,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 3F8556AF19C71BCF003802F2 /* Build configuration list for PBXNativeTarget "UnitTesting" */;
buildPhases = (
3F1422971A07FD990090CEE9 /* Copy Framework */,
3F8556A019C71BCF003802F2 /* Sources */,
3F8556A119C71BCF003802F2 /* Frameworks */,
3F8556A219C71BCF003802F2 /* Resources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
ReferencedContainer = "container:ProtocolBuffers.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3F8556A319C71BCF003802F2"
BuildableName = "ProtocolBuffersTests.xctest"
BlueprintName = "UnitTesting"
ReferencedContainer = "container:ProtocolBuffers.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class ExtendableMessage : GeneratedMessage
extensionRegistry[extensions.fieldNumber] = extensions
}

public func getExtension(extensions:ConcreateExtensionField) -> ConcreateExtensionField
public func getExtension(extensions:ConcreateExtensionField) -> Any
{
ensureExtensionIsRegistered(extensions)
return extensionRegistry[extensions.fieldNumber]!
Expand Down Expand Up @@ -280,7 +280,7 @@ public class ExtendableMessageBuilder:GeneratedMessageBuilder
}
return super.parseUnknownField(input, unknownFields: unknownFields, extensionRegistry: extensionRegistry, tag: tag)
}
public func getExtension(extensions:ConcreateExtensionField) -> ConcreateExtensionField
public func getExtension(extensions:ConcreateExtensionField) -> Any
{
return internalGetResult.getExtension(extensions)
}
Expand Down
Loading

0 comments on commit 4c3ce61

Please sign in to comment.