Skip to content

Commit b9bcc9b

Browse files
authored
Merge pull request #12 from PromiseKit/carthage-xcode-10.2
Carthage Xcode 10.2 support
2 parents 6af1143 + 21153dd commit b9bcc9b

File tree

7 files changed

+80
-40
lines changed

7 files changed

+80
-40
lines changed

.travis.yml

+42-31
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
os: osx
2+
language: swift
3+
osx_image: xcode10.2
4+
15
branches:
26
only:
37
- master
48
stages:
59
- lint
10+
- carthage
611
- swiftPM
712
- test
813
jobs:
@@ -11,11 +16,8 @@ jobs:
1116
stage: lint
1217
osx_image: xcode8.3
1318
env: SWIFT=3.1
14-
name: pod lib lint --swift-version=3.1
15-
os: osx
16-
language: objective-c
1719
before_install:
18-
gem install cocoapods --prerelease --version 1.6.0.beta.1
20+
gem install cocoapods --prerelease --version 1.7.0.beta.3
1921
install:
2022
carthage bootstrap --no-build PromiseKit
2123
script: |
@@ -27,54 +29,63 @@ jobs:
2729
- <<: *pod
2830
osx_image: xcode9.2
2931
env: SWIFT=3.2
30-
name: pod lib lint --swift-version=3.2
3132
- <<: *pod
3233
osx_image: xcode9.4
3334
env: SWIFT=3.3
34-
name: pod lib lint --swift-version=3.3
3535
- <<: *pod
3636
osx_image: xcode10.1
3737
env: SWIFT=3.4
38-
name: pod lib lint --swift-version=3.4
3938
- <<: *pod
4039
osx_image: xcode9.2
4140
env: SWIFT=4.0
42-
name: pod lib lint --swift-version=4.0
4341
- <<: *pod
4442
osx_image: xcode9.4
4543
env: SWIFT=4.1
46-
name: pod lib lint --swift-version=4.1
4744
- <<: *pod
4845
osx_image: xcode10.1
4946
env: SWIFT=4.2
50-
name: pod lib lint --swift-version=4.2
47+
- <<: *pod
48+
osx_image: xcode10.2
49+
env: SWIFT=5.0
5150

52-
- stage: swiftPM
53-
os: osx
54-
language: objective-c
51+
- &carthage
52+
stage: carthage
53+
osx_image: xcode9.2
54+
script: |
55+
carthage bootstrap --cache-builds
56+
sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj
57+
carthage build --no-skip-current
58+
cache:
59+
directories:
60+
- Carthage
61+
- <<: *carthage
62+
osx_image: xcode9.4
63+
- <<: *carthage
5564
osx_image: xcode10.1
56-
name: SwiftPM
57-
script: swift build
65+
- <<: *carthage
66+
osx_image: xcode10.2
67+
68+
- &swiftpm
69+
stage: swiftpm
70+
osx_image: xcode9.2
71+
script: swift build -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12
72+
- <<: *swiftpm
73+
osx_image: xcode9.4
74+
- <<: *swiftpm
75+
osx_image: xcode10.1
76+
- <<: *swiftpm
77+
osx_image: xcode10.2
5878

5979
- &test
6080
stage: test
61-
osx_image: xcode10.1
62-
name: macOS Tests
63-
env: DST='arch=x86_64' PLAT=macOS
64-
os: osx
65-
language: objective-c
66-
cache:
67-
directories:
81+
xcode_scheme: PMKStoreKit
82+
xcode_project: PMKStoreKit.xcodeproj
83+
xcode_destination: 'platform=macOS'
84+
cache.directories:
6885
- Carthage
6986
before_install:
70-
carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT
71-
install:
72-
xcodebuild -scheme PMKStoreKit -target PMKStoreKit -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
73-
script:
74-
xcodebuild -scheme PMKStoreKit -quiet -destination "$DST" test
87+
carthage bootstrap --cache-builds --no-use-binaries
7588
- <<: *test
76-
env: DST='OS=12.0,name=iPhone SE' PLAT=iOS
77-
name: iOS Tests
89+
xcode_destination: 'OS=12.2,name=iPhone SE'
7890
- <<: *test
79-
env: DST='OS=12.0,name=Apple TV' PLAT=tvOS
80-
name: tvOS Tests
91+
xcode_destination: 'OS=12.2,name=Apple TV'

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "mxcl/PromiseKit" ~> 6.0
1+
github "mxcl/PromiseKit" ~> 6.8.4

Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "mxcl/PromiseKit" "6.7.0"
1+
github "mxcl/PromiseKit" "6.8.4"

PMKStoreKit.xcodeproj/project.pbxproj

+9-4
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,28 @@
166166
isa = PBXProject;
167167
attributes = {
168168
LastSwiftUpdateCheck = 0800;
169-
LastUpgradeCheck = 1000;
169+
LastUpgradeCheck = 1020;
170170
ORGANIZATIONNAME = "Max Howell";
171171
TargetAttributes = {
172172
63C7FFA61D5BEE09003BAE60 = {
173173
CreatedOnToolsVersion = 8.0;
174-
LastSwiftMigration = 0900;
174+
LastSwiftMigration = 1020;
175175
ProvisioningStyle = Automatic;
176176
};
177177
63C7FFF11D5C020D003BAE60 = {
178178
CreatedOnToolsVersion = 8.0;
179-
LastSwiftMigration = 0900;
179+
LastSwiftMigration = 1020;
180180
ProvisioningStyle = Automatic;
181181
};
182182
};
183183
};
184184
buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKStoreKit" */;
185185
compatibilityVersion = "Xcode 3.2";
186-
developmentRegion = English;
186+
developmentRegion = en;
187187
hasScannedForEncodings = 0;
188188
knownRegions = (
189189
en,
190+
Base,
190191
);
191192
mainGroup = 63C7FF9D1D5BEE09003BAE60;
192193
productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */;
@@ -255,6 +256,7 @@
255256
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
256257
buildSettings = {
257258
ALWAYS_SEARCH_USER_PATHS = NO;
259+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
258260
CLANG_ANALYZER_NONNULL = YES;
259261
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
260262
CLANG_CXX_LIBRARY = "libc++";
@@ -323,6 +325,7 @@
323325
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
324326
buildSettings = {
325327
ALWAYS_SEARCH_USER_PATHS = NO;
328+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
326329
CLANG_ANALYZER_NONNULL = YES;
327330
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
328331
CLANG_CXX_LIBRARY = "libc++";
@@ -393,6 +396,7 @@
393396
PRODUCT_MODULE_NAME = "${TARGET_NAME}";
394397
PRODUCT_NAME = "$(TARGET_NAME)";
395398
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
399+
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
396400
};
397401
name = Debug;
398402
};
@@ -409,6 +413,7 @@
409413
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
410414
PRODUCT_MODULE_NAME = "${TARGET_NAME}";
411415
PRODUCT_NAME = "$(TARGET_NAME)";
416+
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
412417
};
413418
name = Release;
414419
};

PMKStoreKit.xcodeproj/xcshareddata/xcschemes/PMKStoreKit.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.2
1+
// swift-tools-version:4.0
22
import PackageDescription
33

44
let name = "PMKStoreKit"
@@ -7,7 +7,7 @@ let pkg = Package(name: name)
77
pkg.products = [
88
.library(name: name, targets: [name]),
99
]
10-
pkg.swiftLanguageVersions = [.v3, .v4, .v4_2]
10+
pkg.swiftLanguageVersions = [3, 4]
1111
pkg.dependencies = [
1212
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0")
1313
]

[email protected]

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// swift-tools-version:4.2
2+
import PackageDescription
3+
4+
let name = "PMKStoreKit"
5+
6+
let pkg = Package(name: name)
7+
pkg.products = [
8+
.library(name: name, targets: [name]),
9+
]
10+
pkg.swiftLanguageVersions = [.v3, .v4, .v4_2, .version("5")]
11+
pkg.dependencies = [
12+
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0")
13+
]
14+
15+
let target: Target = .target(name: name)
16+
target.path = "Sources"
17+
target.exclude = [
18+
"SKRequest+AnyPromise.h",
19+
"SKRequest+AnyPromise.m",
20+
"\(name).h",
21+
]
22+
target.dependencies = ["PromiseKit"]
23+
24+
pkg.targets = [target]

0 commit comments

Comments
 (0)