Skip to content

Commit

Permalink
Only include benchmark dependency and target if ENV enables it
Browse files Browse the repository at this point in the history
feature/add-unmanaged-protocol-for-types-that-prefer-a-unique-id-other-than-ObjectID
  • Loading branch information
roanutil committed Aug 20, 2024
1 parent 6822454 commit f18eb2f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 92 deletions.
74 changes: 1 addition & 73 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,51 +1,6 @@
{
"originHash" : "961a2dee3755ec2665e3b282f793f12ca2d10b388555dc2d13062dc4751b918c",
"originHash" : "60f203ef2dee44497fdfb68df4d9a324f9c0d479502229f34baf5260677b0f69",
"pins" : [
{
"identity" : "hdrhistogram-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/HdrHistogram/hdrhistogram-swift",
"state" : {
"revision" : "a69fa24d7b70421870cafa86340ece900489e17e",
"version" : "0.1.2"
}
},
{
"identity" : "package-benchmark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ordo-one/package-benchmark.git",
"state" : {
"revision" : "6889229e21c6d9d0421a050e9e11c8f5eb5bc279",
"version" : "1.23.5"
}
},
{
"identity" : "package-jemalloc",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ordo-one/package-jemalloc",
"state" : {
"revision" : "e8a5db026963f5bfeac842d9d3f2cc8cde323b49",
"version" : "1.0.0"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
"identity" : "swift-atomics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-atomics",
"state" : {
"revision" : "cd142fd2f64be2100422d658e7411e39489da985",
"version" : "1.2.0"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
Expand All @@ -55,33 +10,6 @@
"version" : "1.3.3"
}
},
{
"identity" : "swift-numerics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-numerics",
"state" : {
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
},
{
"identity" : "swift-system",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system",
"state" : {
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
"version" : "1.3.2"
}
},
{
"identity" : "texttable",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ordo-one/TextTable",
"state" : {
"revision" : "a27a07300cf4ae322e0079ca0a475c5583dd575f",
"version" : "0.0.2"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
Expand Down
44 changes: 25 additions & 19 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// swift-tools-version:5.10

import PackageDescription
import Foundation

let package = Package(
name: "CoreDataRepository",
Expand All @@ -20,10 +21,6 @@ let package = Package(
),
],
dependencies: [
.package(
url: "https://github.com/ordo-one/package-benchmark.git",
from: "1.23.5"
),
.package(
url: "https://github.com/pointfreeco/swift-custom-dump.git",
from: "1.0.0"
Expand Down Expand Up @@ -66,18 +63,27 @@ extension [SwiftSetting] {
]
}

// Benchmark of coredata-repository-benchmarks
package.targets += [
.executableTarget(
name: "coredata-repository-benchmarks",
dependencies: [
.product(name: "Benchmark", package: "package-benchmark"),
"CoreDataRepository",
"Internal",
],
path: "Benchmarks/coredata-repository-benchmarks",
plugins: [
.plugin(name: "BenchmarkPlugin", package: "package-benchmark"),
]
),
]
if ["YES", "TRUE"].contains((ProcessInfo.processInfo.environment["BENCHMARKS"])?.uppercased()) {
package.dependencies += [
.package(
url: "https://github.com/ordo-one/package-benchmark.git",
from: "1.23.5"
),
]

// Benchmark of coredata-repository-benchmarks
package.targets += [
.executableTarget(
name: "coredata-repository-benchmarks",
dependencies: [
.product(name: "Benchmark", package: "package-benchmark"),
"CoreDataRepository",
"Internal",
],
path: "Benchmarks/coredata-repository-benchmarks",
plugins: [
.plugin(name: "BenchmarkPlugin", package: "package-benchmark"),
]
),
]
}

0 comments on commit f18eb2f

Please sign in to comment.