mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 22:45:19 +00:00
* SPM Test target + Github Action to build and test Because the tests are XCTests `swift test` runs them first and then runs another batch of empty tests which results in "0 tests" at the end of the report - https://github.com/swiftlang/swift-package-manager/issues/8529#issuecomment-2815711345 * Fix dependency and library issues + handle mixed languages `include` folder has to be next to the `*.c` file for it to work
60 lines
1.5 KiB
Swift
60 lines
1.5 KiB
Swift
// swift-tools-version: 5.9
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "bitchat",
|
|
platforms: [
|
|
.iOS(.v16),
|
|
.macOS(.v13)
|
|
],
|
|
products: [
|
|
.executable(
|
|
name: "bitchat",
|
|
targets: ["bitchat"]
|
|
),
|
|
],
|
|
dependencies:[
|
|
.package(url: "https://github.com/21-DOT-DEV/swift-secp256k1", exact: "0.21.1")
|
|
],
|
|
targets: [
|
|
.executableTarget(
|
|
name: "bitchat",
|
|
dependencies: [
|
|
.product(name: "P256K", package: "swift-secp256k1"),
|
|
.target(name: "TorC"),
|
|
.target(name: "tor-nolzma")
|
|
],
|
|
path: "bitchat",
|
|
exclude: [
|
|
"Info.plist",
|
|
"Assets.xcassets",
|
|
"bitchat.entitlements",
|
|
"bitchat-macOS.entitlements",
|
|
"LaunchScreen.storyboard",
|
|
"Services/Tor/C/"
|
|
],
|
|
linkerSettings: [
|
|
.linkedLibrary("z")
|
|
]
|
|
),
|
|
.target(
|
|
name: "TorC",
|
|
path: "bitchat/Services/Tor/C"
|
|
),
|
|
.binaryTarget(
|
|
name: "tor-nolzma",
|
|
path: "Frameworks/tor-nolzma.xcframework"
|
|
),
|
|
.testTarget(
|
|
name: "bitchatTests",
|
|
dependencies: ["bitchat"],
|
|
path: "bitchatTests",
|
|
exclude: [
|
|
"Info.plist",
|
|
"README.md"
|
|
]
|
|
)
|
|
]
|
|
)
|