Skip to content

Commit 9c3a57c

Browse files
committed
swift package test
Signed-off-by: Joseph Mattello <mail@joemattiello.com>
1 parent 7e0e7ed commit 9c3a57c

4 files changed

Lines changed: 87 additions & 47 deletions

File tree

.github/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: Build
6+
jobs:
7+
test:
8+
name: Build
9+
runs-on: macOS-latest
10+
strategy:
11+
matrix:
12+
destination: [
13+
'platform=iOS Simulator,OS=12.4,name=iPhone X',
14+
'platform=tvOS Simulator,OS=12.4,name=Apple TV 4']
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@master
18+
- name: Build
19+
run: |
20+
pod install
21+
set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
22+
env:
23+
destination: ${{ matrix.destination }}

.github/swiftlint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Swift Lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/swiftlint.yml'
7+
- '.swiftlint.yml'
8+
- '**/*.swift'
9+
10+
jobs:
11+
swift-lint:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: GitHub Action for SwiftLint
17+
uses: norio-nomura/action-swiftlint@3.2.1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
DIFF_BASE: ${{ github.base_ref }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ xcuserdata
3333
*.hmap
3434
*.ipa
3535
*.swiftpm
36+
37+
/.build
38+
/.vscode

Package.swift

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,28 @@ let package = Package(
88
name: "AltSign",
99
platforms: [
1010
.iOS(.v12),
11-
.macOS(.v10_14),
11+
.macOS(.v10_14)
1212
],
1313
products: [
14-
/*.library(
14+
.library(
1515
name: "AltSign-Dynamic",
1616
type: .dynamic,
17-
targets: ["AltSign", "CAltSign", "CoreCrypto", "CCoreCrypto", "ldid", "ldid-core"]
18-
),*/
17+
targets: ["AltSign", "CAltSign", "CoreCrypto", "CCoreCrypto", "ldid", "ldid-core", "OpenSSL"]
18+
),
1919
.library(
20-
name: "AltSign",
21-
//type: .static,
20+
name: "AltSign-Static",
2221
targets: ["AltSign", "CAltSign", "CoreCrypto", "CCoreCrypto", "ldid", "ldid-core"]
23-
),
24-
],
25-
26-
dependencies: [
27-
.package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.180"))
22+
)
2823
],
29-
24+
dependencies: [],
3025
targets: [
31-
/*.binaryTarget(
26+
.binaryTarget(
3227
name: "OpenSSL",
3328
path: "Dependencies/OpenSSL/Frameworks/OpenSSL.xcframework"
34-
),*/
35-
29+
),
30+
3631
.target(
3732
name: "ldid-core",
38-
dependencies: ["OpenSSL"],
3933
path: "Dependencies/ldid",
4034
exclude: [
4135
"ldid.hpp",
@@ -70,67 +64,67 @@ let package = Package(
7064
"libplist/libcnary/cnary.c",
7165
"libplist/libcnary/COPYING",
7266
"libplist/libcnary/Makefile.am",
73-
"libplist/libcnary/README",
67+
"libplist/libcnary/README"
7468
],
7569
sources: [
7670
"lookup2.c",
7771
"libplist/src",
7872
"libplist/libcnary",
79-
// "libplist/libcnary/src",
73+
"libplist/libcnary/src"
8074
],
8175
publicHeadersPath: "",
8276
cSettings: [
8377
.headerSearchPath("libplist/include"),
8478
.headerSearchPath("libplist/src"),
8579
.headerSearchPath("libplist/libcnary/include"),
86-
// .headerSearchPath("../OpenSSL/ios/include"),
80+
.headerSearchPath("../OpenSSL/ios/include")
8781
]
8882
),
8983
.target(
9084
name: "ldid",
9185
dependencies: ["ldid-core"],
9286
path: "AltSign/ldid",
9387
exclude: [
94-
"alt_ldid.hpp",
88+
"alt_ldid.hpp"
9589
],
9690
sources: [
97-
"alt_ldid.cpp",
91+
"alt_ldid.cpp"
9892
],
9993
publicHeadersPath: "",
10094
cSettings: [
10195
.headerSearchPath("../../Dependencies/ldid"),
10296
.headerSearchPath("../../Dependencies/ldid/libplist/include"),
10397
.headerSearchPath("../../Dependencies/ldid/libplist/src"),
10498
.headerSearchPath("../../Dependencies/ldid/libplist/libcnary/include"),
105-
// .headerSearchPath("../../Dependencies/OpenSSL/ios/include"),
99+
.headerSearchPath("../../Dependencies/OpenSSL/ios/include")
106100
]
107101
),
108-
102+
109103
.target(
110104
name: "CCoreCrypto",
111105
path: "Dependencies/corecrypto",
112-
exclude: [
113-
"Sources/CoreCryptoMacros.swift"
114-
],
106+
// exclude: [
107+
// "Sources/CoreCryptoMacros.swift"
108+
// ],
115109
cSettings: [
116110
.headerSearchPath("include/corecrypto"),
117111
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1")
118112
]
119113
),
120-
.target(
121-
name: "CoreCrypto",
122-
dependencies: ["CCoreCrypto"],
123-
path: "Dependencies/corecrypto/Sources",
124-
exclude: [
125-
"ccsrp.m"
126-
],
127-
sources: [
128-
"CoreCryptoMacros.swift"
129-
],
130-
cSettings: [
131-
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1")
132-
]
133-
),
114+
// .target(
115+
// name: "CoreCrypto",
116+
// dependencies: ["CCoreCrypto"],
117+
// path: "Dependencies/corecrypto/Sources",
118+
// exclude: [
119+
// "ccsrp.m"
120+
// ],
121+
// sources: [
122+
// "CoreCryptoMacros.swift"
123+
// ],
124+
// cSettings: [
125+
// .define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1")
126+
// ]
127+
// ),
134128

135129
.target(
136130
name: "CAltSign",
@@ -143,27 +137,27 @@ let package = Package(
143137
"AltSign/include/module.modulemap",
144138
"Dependencies/corecrypto",
145139
"Dependencies/ldid",
146-
// "Dependencies/OpenSSL",
140+
"Dependencies/OpenSSL",
147141
"Dependencies/minizip/iowin32.c",
148142
"Dependencies/minizip/Makefile",
149143
"Dependencies/minizip/minizip.c",
150144
"Dependencies/minizip/miniunz.c",
151-
// "Dependencies/minizip/ChangeLogUnzip",
145+
"Dependencies/minizip/ChangeLogUnzip"
152146
],
153147
publicHeadersPath: "AltSign/include",
154148
cSettings: [
155149
.headerSearchPath("AltSign/**"),
156150
.headerSearchPath("AltSign/ldid"),
157151
.headerSearchPath("Dependencies/minizip"),
158152
.headerSearchPath("AltSign/Capabilities"),
159-
// .headerSearchPath("Dependencies/OpenSSL/ios/include"),
153+
.headerSearchPath("Dependencies/OpenSSL/ios/include"),
160154
.headerSearchPath("Dependencies/ldid/libplist/include"),
161155
.headerSearchPath("Dependencies/ldid"),
162-
.define("unix=1"),
156+
.define("unix=1")
163157
],
164158
linkerSettings: [
165159
.linkedFramework("UIKit", .when(platforms: [.iOS])),
166-
.linkedFramework("Security"),
160+
.linkedFramework("Security")
167161
]
168162
),
169163
.target(
@@ -172,11 +166,11 @@ let package = Package(
172166
path: "AltSign/Sources",
173167
cSettings: [
174168
.headerSearchPath("Dependencies/minizip"),
175-
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1"),
169+
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1")
176170
]
177171
)
178172
],
179-
173+
180174
cLanguageStandard: CLanguageStandard.gnu11,
181175
cxxLanguageStandard: .cxx14
182176
)

0 commit comments

Comments
 (0)