Skip to content

Commit

Permalink
[HEAP-40098] Reduce dependencies in public artifact (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnickel authored Feb 21, 2023
1 parent cf56e65 commit 1fbd791
Show file tree
Hide file tree
Showing 71 changed files with 134 additions and 163 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions Development/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version": "2.1.1"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
"version": "2.1.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
"version": "10.0.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "f9d519828bb03dfc8125467d8f7b93131951124c",
"version": "5.0.1"
}
},
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
"state": {
"branch": null,
"revision": "ab3a58b7209a17d781c0d1dbb3e1ff3da306bae8",
"version": "1.20.3"
}
}
]
},
"version": 1
}
48 changes: 48 additions & 0 deletions Development/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// swift-tools-version: 5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "HeapSwiftCoreTestSupport",
platforms: [
.macOS(.v10_14),
.iOS(.v12),
.watchOS(.v5),
.tvOS(.v12),
],
products: [
.library(
name: "HeapSwiftCoreTestSupport",
type: .dynamic,
targets: ["HeapSwiftCoreTestSupport"]),
],
dependencies: [
.package(name: "HeapSwiftCore", path: "../"),
.package(url: "https://github.com/Quick/Quick.git", from: "5.0.1"),
.package(url: "https://github.com/Quick/Nimble.git", from: "10.0.0"),
],
targets: [
.target(
name: "HeapSwiftCoreTestSupport",
dependencies: [
"HeapSwiftCore",
"Quick",
"Nimble",
]),
.testTarget(
name: "HeapSwiftCoreTests",
dependencies: [
"HeapSwiftCoreTestSupport",
"Quick",
"Nimble",
]),
.testTarget(
name: "HeapSwiftCoreTests-AdSupport",
dependencies: [
"HeapSwiftCoreTestSupport",
"Quick",
"Nimble",
]),
]
)
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version": "2.1.1"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
"version": "2.1.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
"version": "10.0.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "f9d519828bb03dfc8125467d8f7b93131951124c",
"version": "5.0.1"
}
},
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version": "2.1.1"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
"version": "2.1.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
"version": "10.0.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "f9d519828bb03dfc8125467d8f7b93131951124c",
"version": "5.0.1"
}
},
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
Expand Down
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
PUBLIC_REPO := git@github.com:heap/heap-swift-core-sdk.git
INTERNAL_REPO := git@github.com:heap/heap-swift-core.git
MAIN_BRANCH := main
MAKE_DIR := $(shell pwd)

# 1 - test name, 2 - xcodebuild parameters
define run_unit_tests
Expand All @@ -25,16 +26,18 @@ define run_unit_tests
@echo "$(2)"

-rm -rf build/reports/$(1).*
-rm -rf Development/build/reports/$(1).*
-rm build/.success

-(xcodebuild \
-scheme HeapSwiftCore-Package \
-(cd Development && xcodebuild \
-scheme HeapSwiftCoreTestSupport \
$(2) \
-resultBundlePath build/reports/$(1).xcresult \
-resultBundlePath ${MAKE_DIR}/build/reports/$(1).xcresult \
clean test \
&& echo "success" > build/.success \
&& echo "success" > ${MAKE_DIR}/build/.success \
) | xcbeautify --report junit --junit-report-filename $(1)-$$BUILDKITE_JOB_ID.xml

-mv Development/build/$(1).* build/
-cd build/reports && tar -zcf $(1).xcresult.tgz $(1).xcresult
-rm -rf build/reports/$(1).xcresult

Expand Down Expand Up @@ -91,7 +94,7 @@ catalyst_unit_tests:
mkdir -p build
echo "platform=macOS,variant=Mac Catalyst" > build/.destination

$(call run_unit_tests,catalyst_unit_tests,-destination "`cat build/.destination`")
$(call run_unit_tests,catalyst_unit_tests,-destination "`cat ${MAKE_DIR}/build/.destination`")
@if [ ! -f build/.success ]; then exit 1; fi

iphone_ios12_unit_tests:
Expand All @@ -104,7 +107,7 @@ iphone_ios12_unit_tests:
mkdir -p build
echo "platform=iOS Simulator,id=`cat build/.device_udid`" > build/.destination

$(call run_unit_tests,iphone_ios12_unit_tests,-destination "`cat build/.destination`")
$(call run_unit_tests,iphone_ios12_unit_tests,-destination "`cat ${MAKE_DIR}/build/.destination`")

$(call delete_device)

Expand All @@ -120,7 +123,7 @@ iphone_ios16_unit_tests:
mkdir -p build
echo "platform=iOS Simulator,id=`cat build/.device_udid`" > build/.destination

$(call run_unit_tests,iphone_ios16_unit_tests,-destination "`cat build/.destination`")
$(call run_unit_tests,iphone_ios16_unit_tests,-destination "`cat ${MAKE_DIR}/build/.destination`")

$(call delete_device)

Expand All @@ -136,7 +139,7 @@ ipad_unit_tests:
mkdir -p build
echo "platform=iOS Simulator,id=`cat build/.device_udid`" > build/.destination

$(call run_unit_tests,ipad_unit_tests,-destination "`cat build/.destination`")
$(call run_unit_tests,ipad_unit_tests,-destination "`cat ${MAKE_DIR}/build/.destination`")

$(call delete_device)

Expand All @@ -152,7 +155,7 @@ tvos_unit_tests:
mkdir -p build
echo "platform=tvOS Simulator,id=`cat build/.device_udid`" > build/.destination

$(call run_unit_tests,tvos_unit_tests,-destination "`cat build/.destination`")
$(call run_unit_tests,tvos_unit_tests,-destination "`cat ${MAKE_DIR}/build/.destination`")

$(call delete_device)

Expand All @@ -168,7 +171,7 @@ watchos_unit_tests:
mkdir -p build
echo "platform=watchOS Simulator,id=`cat build/.device_udid`" > build/.destination

$(call run_unit_tests,watchos_unit_tests,-destination "`cat build/.destination`")
$(call run_unit_tests,watchos_unit_tests,-destination "`cat ${MAKE_DIR}/build/.destination`")

$(call delete_device)

Expand Down
60 changes: 13 additions & 47 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,50 +1,16 @@
{
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version" : "2.1.1"
"object": {
"pins": [
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
"state": {
"branch": null,
"revision": "ab3a58b7209a17d781c0d1dbb3e1ff3da306bae8",
"version": "1.20.3"
}
}
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state" : {
"revision" : "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
"version" : "2.1.0"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
"version" : "10.0.0"
}
},
{
"identity" : "quick",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Quick.git",
"state" : {
"revision" : "f9d519828bb03dfc8125467d8f7b93131951124c",
"version" : "5.0.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "fa0fcd43f272a260e7f734f23e6dc55e16fcae0a",
"version" : "1.19.1"
}
}
],
"version" : 2
]
},
"version": 1
}
Loading

0 comments on commit 1fbd791

Please sign in to comment.