-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from XYOracleNetwork/develop
add full support for swift packages
- Loading branch information
Showing
8 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Swift Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios13.0-simulator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "Apollo", | ||
"repositoryURL": "https://github.com/apollographql/apollo-ios.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "1b3758593f927212f43a2d567aff86ef34513dc2", | ||
"version": "0.23.1" | ||
} | ||
}, | ||
{ | ||
"package": "Promises", | ||
"repositoryURL": "https://github.com/google/promises", | ||
"state": { | ||
"branch": null, | ||
"revision": "6b6f4fe3385ed37389fb231bc40be81de2f1230f", | ||
"version": "1.2.8" | ||
} | ||
}, | ||
{ | ||
"package": "XyBaseSdk", | ||
"repositoryURL": "https://github.com/XYOracleNetwork/sdk-base-swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "837e268d9b167d02fa8a047b15b0f7cca6eff75b", | ||
"version": "1.0.4" | ||
} | ||
}, | ||
{ | ||
"package": "XyBleSdk", | ||
"repositoryURL": "https://github.com/XYOracleNetwork/sdk-ble-swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "84332adab9e928c55df2cd05b894121df9d8fe53", | ||
"version": "3.1.5" | ||
} | ||
}, | ||
{ | ||
"package": "sdk-core-swift", | ||
"repositoryURL": "https://github.com/XYOracleNetwork/sdk-core-swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "98b42d01174c3c39bd0a7d88b55f3b1aafa3eb83", | ||
"version": "3.1.1" | ||
} | ||
}, | ||
{ | ||
"package": "secp256k1", | ||
"repositoryURL": "https://github.com/Boilertalk/secp256k1.swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "823281fe9def21b384099b72a9a53ca988317b20", | ||
"version": "0.1.4" | ||
} | ||
}, | ||
{ | ||
"package": "SQLite.swift", | ||
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "0a9893ec030501a3956bee572d6b4fdd3ae158a1", | ||
"version": "0.12.2" | ||
} | ||
}, | ||
{ | ||
"package": "Starscream", | ||
"repositoryURL": "https://github.com/daltoniam/Starscream", | ||
"state": { | ||
"branch": null, | ||
"revision": "e6b65c6d9077ea48b4a7bdda8994a1d3c6969c8d", | ||
"version": "3.1.1" | ||
} | ||
}, | ||
{ | ||
"package": "swift-nio-zlib-support", | ||
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd", | ||
"version": "1.0.0" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// swift-tools-version:5.1 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "sdk-xyo-swift", | ||
platforms: [ | ||
.iOS(.v13), | ||
.macOS(.v10_15) | ||
], | ||
products: [ | ||
// Products define the executables and libraries produced by a package, and make them visible to other packages. | ||
.library( | ||
name: "sdk-xyo-swift", | ||
targets: ["sdk-xyo-swift"]), | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
// .package(url: /* package url */, from: "1.0.0"), | ||
.package(url: "https://github.com/XYOracleNetwork/sdk-ble-swift.git", from: "3.1.5"), | ||
.package(url: "https://github.com/XYOracleNetwork/sdk-core-swift.git", from: "3.1.1"), | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
// Targets can depend on other targets in this package, and on products in packages which this package depends on. | ||
.target( | ||
name: "sdk-xyo-swift", | ||
dependencies: ["sdk-core-swift", "XyBleSdk"]), | ||
.testTarget( | ||
name: "sdk-xyo-swiftTests", | ||
dependencies: ["sdk-xyo-swift"]), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
struct sdk_xyo_swift { | ||
var text = "Hello, World!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import XCTest | ||
|
||
import sdk_xyo_swiftTests | ||
|
||
var tests = [XCTestCaseEntry]() | ||
tests += sdk_xyo_swiftTests.allTests() | ||
XCTMain(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import XCTest | ||
|
||
#if !canImport(ObjectiveC) | ||
public func allTests() -> [XCTestCaseEntry] { | ||
return [ | ||
testCase(sdk_xyo_swiftTests.allTests), | ||
] | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import XCTest | ||
@testable import sdk_xyo_swift | ||
|
||
final class sdk_xyo_swiftTests: XCTestCase { | ||
func testExample() { | ||
// This is an example of a functional test case. | ||
// Use XCTAssert and related functions to verify your tests produce the correct | ||
// results. | ||
XCTAssertEqual(sdk_xyo_swift().text, "Hello, World!") | ||
} | ||
|
||
static var allTests = [ | ||
("testExample", testExample), | ||
] | ||
} |