Skip to content

Commit f5202f7

Browse files
authored
Merge pull request #4 from PromiseKit/carthage-xcode-10.2
Carthage Xcode 10.2 support
2 parents 4372659 + eab7c8d commit f5202f7

File tree

5 files changed

+77
-48
lines changed

5 files changed

+77
-48
lines changed

.travis.yml

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,67 @@
11
os: osx
2-
language: objective-c
3-
matrix:
4-
include:
5-
- {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=3.2 DST="OS=11.2,name=Apple TV"'}
6-
- {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=3.2 DST="OS=4.2,name=Apple Watch - 38mm"'}
2+
language: swift
3+
osx_image: xcode10.2
74

8-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=3.3 DST="OS=11.4,name=iPhone SE"'}
9-
- {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=3.3 DST="OS=11.4,name=Apple TV"'}
10-
- {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=3.3 DST="OS=4.3,name=Apple Watch - 38mm"'}
5+
branches:
6+
only:
7+
- master
8+
stages:
9+
- lint
10+
- carthage
11+
- test
12+
jobs:
13+
include:
14+
- &pod
15+
stage: lint
16+
osx_image: xcode9.4
17+
env: SWIFT=3.3
18+
before_install:
19+
gem install cocoapods --prerelease --version 1.7.0.beta.3
20+
install:
21+
carthage bootstrap --no-build PromiseKit
22+
script: |
23+
cd Carthage/Checkouts/PromiseKit
24+
mv .github/PromiseKit.podspec .
25+
rm -rf Extensions/HomeKit/Sources
26+
cp -R ../../../Sources Extensions/HomeKit
27+
pod lib lint --subspec=PromiseKit/HomeKit --fail-fast --swift-version=$SWIFT
28+
- <<: *pod
29+
osx_image: xcode10.1
30+
env: SWIFT=3.4
31+
- <<: *pod
32+
osx_image: xcode9.4
33+
env: SWIFT=4.1
34+
- <<: *pod
35+
osx_image: xcode10.1
36+
env: SWIFT=4.2
37+
- <<: *pod
38+
osx_image: xcode10.2
39+
env: SWIFT=5.0
1140

12-
- {osx_image: xcode10, env: 'PLAT=iOS SWFT=3.4 DST="OS=12.0,name=iPhone SE"'}
13-
- {osx_image: xcode10, env: 'PLAT=tvOS SWFT=3.4 DST="OS=12.0,name=Apple TV"'}
14-
- {osx_image: xcode10, env: 'PLAT=watchOS SWFT=3.4 DST="OS=5.0,name=Apple Watch Series 3 - 42mm"'}
41+
- &carthage
42+
stage: carthage
43+
osx_image: xcode9.4
44+
script: |
45+
carthage bootstrap --cache-builds
46+
sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj
47+
carthage build --no-skip-current
48+
cache.directories:
49+
- Carthage
50+
- <<: *carthage
51+
osx_image: xcode10.1
52+
- <<: *carthage
53+
osx_image: xcode10.2
1554

16-
- {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=4.0 DST="OS=11.2,name=Apple TV"'}
17-
- {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=4.0 DST="OS=4.2,name=Apple Watch - 38mm"'}
18-
19-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=11.4,name=iPhone 5s" TEST=1'}
20-
- {osx_image: xcode9.3, env: 'PLAT=tvOS SWFT=4.1 DST="OS=10.2,name=Apple TV 1080p"'}
21-
- {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=4.1 DST="OS=11.4,name=Apple TV" TEST=1'}
22-
- {osx_image: xcode9.3, env: 'PLAT=watchOS SWFT=4.1 DST="OS=3.2,name=Apple Watch - 38mm"'}
23-
- {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=4.1 DST="OS=4.3,name=Apple Watch - 38mm"'}
24-
25-
- {osx_image: xcode10, env: 'PLAT=iOS SWFT=4.2 DST="OS=12.0,name=iPhone SE"'}
26-
- {osx_image: xcode10, env: 'PLAT=tvOS SWFT=4.2 DST="OS=12.0,name=Apple TV"'}
27-
- {osx_image: xcode10, env: 'PLAT=watchOS SWFT=4.2 DST="OS=5.0,name=Apple Watch Series 3 - 42mm"'}
28-
cache:
29-
directories:
30-
- Carthage
31-
before_install:
32-
- carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT --verbose
33-
install:
34-
- xcodebuild -scheme PMKHomeKit -target PMKHomeKit -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
35-
- if [[ $TEST == "1" ]]; then
36-
xcodebuild -scheme PMKHomeKit -target PMKHKTests -quiet -destination "$DST" build;
37-
fi
38-
script:
39-
- if [[ "$TEST" == "1" ]]; then
40-
xcodebuild -scheme PMKHomeKit -quiet -destination "$DST" test;
41-
fi
55+
- &test
56+
stage: test
57+
xcode_scheme: PMKHomeKit
58+
xcode_project: PMKHomeKit.xcodeproj
59+
xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE'
60+
cache.directories:
61+
- Carthage
62+
before_install:
63+
carthage bootstrap --cache-builds --no-use-binaries
64+
after_success:
65+
bash <(curl -s https://codecov.io/bash);
66+
- <<: *test
67+
xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV'

Cartfile

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "mxcl/PromiseKit" "6.3.4"
1+
github "mxcl/PromiseKit" "6.8.4"

PMKHomeKit.xcodeproj/project.pbxproj

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,27 +158,28 @@
158158
isa = PBXProject;
159159
attributes = {
160160
LastSwiftUpdateCheck = 0800;
161-
LastUpgradeCheck = 0930;
161+
LastUpgradeCheck = 1020;
162162
ORGANIZATIONNAME = "Max Howell";
163163
TargetAttributes = {
164164
63C7FFA61D5BEE09003BAE60 = {
165165
CreatedOnToolsVersion = 8.0;
166-
LastSwiftMigration = 0900;
166+
LastSwiftMigration = 1020;
167167
ProvisioningStyle = Automatic;
168168
};
169169
63C7FFF11D5C020D003BAE60 = {
170170
CreatedOnToolsVersion = 8.0;
171-
LastSwiftMigration = 0940;
171+
LastSwiftMigration = 1020;
172172
ProvisioningStyle = Automatic;
173173
};
174174
};
175175
};
176176
buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHomeKit" */;
177177
compatibilityVersion = "Xcode 3.2";
178-
developmentRegion = English;
178+
developmentRegion = en;
179179
hasScannedForEncodings = 0;
180180
knownRegions = (
181181
en,
182+
Base,
182183
);
183184
mainGroup = 63C7FF9D1D5BEE09003BAE60;
184185
productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */;
@@ -247,6 +248,7 @@
247248
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
248249
buildSettings = {
249250
ALWAYS_SEARCH_USER_PATHS = NO;
251+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
250252
CLANG_ANALYZER_NONNULL = YES;
251253
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
252254
CLANG_CXX_LIBRARY = "libc++";
@@ -300,7 +302,7 @@
300302
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos";
301303
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
302304
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
303-
SWIFT_VERSION = 3.0;
305+
SWIFT_VERSION = 4.0;
304306
TARGETED_DEVICE_FAMILY = "1,2,3,4";
305307
TVOS_DEPLOYMENT_TARGET = 9.0;
306308
VERSIONING_SYSTEM = "apple-generic";
@@ -314,6 +316,7 @@
314316
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
315317
buildSettings = {
316318
ALWAYS_SEARCH_USER_PATHS = NO;
319+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
317320
CLANG_ANALYZER_NONNULL = YES;
318321
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
319322
CLANG_CXX_LIBRARY = "libc++";
@@ -359,7 +362,7 @@
359362
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation;
360363
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos";
361364
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
362-
SWIFT_VERSION = 3.0;
365+
SWIFT_VERSION = 4.0;
363366
TARGETED_DEVICE_FAMILY = "1,2,3,4";
364367
TVOS_DEPLOYMENT_TARGET = 9.0;
365368
VALIDATE_PRODUCT = YES;
@@ -383,6 +386,7 @@
383386
PRODUCT_NAME = "$(TARGET_NAME)";
384387
SKIP_INSTALL = YES;
385388
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
389+
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
386390
};
387391
name = Debug;
388392
};
@@ -399,6 +403,7 @@
399403
PRODUCT_MODULE_NAME = "${TARGET_NAME}";
400404
PRODUCT_NAME = "$(TARGET_NAME)";
401405
SKIP_INSTALL = YES;
406+
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
402407
};
403408
name = Release;
404409
};
@@ -412,7 +417,6 @@
412417
PRODUCT_NAME = "$(TARGET_NAME)";
413418
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
414419
SWIFT_SUPPRESS_WARNINGS = YES;
415-
SWIFT_VERSION = 4.0;
416420
};
417421
name = Debug;
418422
};
@@ -425,7 +429,6 @@
425429
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
426430
PRODUCT_NAME = "$(TARGET_NAME)";
427431
SWIFT_SUPPRESS_WARNINGS = YES;
428-
SWIFT_VERSION = 4.0;
429432
};
430433
name = Release;
431434
};

PMKHomeKit.xcodeproj/xcshareddata/xcschemes/PMKHomeKit.xcscheme

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

0 commit comments

Comments
 (0)