Skip to content

Commit a1ae1d1

Browse files
committed
Upgrade CI config
1 parent e80216c commit a1ae1d1

File tree

5 files changed

+111
-125
lines changed

5 files changed

+111
-125
lines changed

.circleci/config.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
version: 2.1
2+
3+
step-library:
4+
- &restore-cache
5+
restore_cache:
6+
keys:
7+
- cache-mbgeocoder-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cartfile.resolved" }}
8+
- cache-mbgeocoder-v1-{{ .Environment.CIRCLE_JOB }} # used if checksum fails
9+
10+
- &save-cache
11+
save_cache:
12+
key: cache-mbgeocoder-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cartfile.resolved" }}
13+
paths:
14+
- Carthage
15+
16+
- &prepare
17+
run:
18+
name: Prepare
19+
command: |
20+
curl -L https://github.com/Carthage/Carthage/releases/download/0.33.0/Carthage.pkg >> Carthage.pkg
21+
sudo installer -pkg Carthage.pkg -target /
22+
echo "foo" > ~/.mapbox
23+
24+
- &publish-codecov
25+
run:
26+
name: Publish code coverage
27+
command: bash <(curl -s https://codecov.io/bash)
28+
29+
jobs:
30+
build-job:
31+
parameters:
32+
xcode:
33+
type: string
34+
device:
35+
type: string
36+
default: "iPhone 6 Plus"
37+
iOS:
38+
type: string
39+
default: "12.1"
40+
watchOS:
41+
type: string
42+
default: "5.0"
43+
tvOS:
44+
type: string
45+
default: "12.0"
46+
test:
47+
type: boolean
48+
default: true
49+
codecoverage:
50+
type: boolean
51+
default: false
52+
macos:
53+
xcode: << parameters.xcode >>
54+
environment:
55+
HOMEBREW_NO_AUTO_UPDATE: 1
56+
steps:
57+
- checkout
58+
- *prepare
59+
- run:
60+
name: Install prerequisites
61+
command: |
62+
if [ $(xcversion simulators | grep -cF "iOS << parameters.iOS >> Simulator (installed)") -eq 0 ]; then xcversion simulators --install="iOS << parameters.iOS >>" || true; fi
63+
- *restore-cache
64+
- run:
65+
name: Dependencies
66+
command: |
67+
carthage bootstrap --platform ios --cache-builds --configuration Debug --no-use-binaries
68+
carthage bootstrap --platform tvos --cache-builds --configuration Debug --no-use-binaries
69+
carthage bootstrap --platform macos --cache-builds --configuration Debug --no-use-binaries
70+
carthage bootstrap --platform watchos --cache-builds --configuration Debug --no-use-binaries
71+
- *save-cache
72+
- run:
73+
name: iOS
74+
command: xcodebuild -sdk iphonesimulator -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder iOS' -destination 'platform=iOS Simulator,OS=<< parameters.iOS >>,name=<< parameters.device >>' clean build <<# parameters.test >>test<</ parameters.test >><<# parameters.codecoverage >> -enableCodeCoverage "YES"<</ parameters.codecoverage >>
75+
- when:
76+
condition: << parameters.codecoverage >>
77+
steps:
78+
- *publish-codecov
79+
- run:
80+
name: tvOS
81+
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder tvOS' -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p),OS=<< parameters.tvOS >>' clean build <<# parameters.test >>test <</ parameters.test >> <<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >>
82+
- when:
83+
condition: << parameters.codecoverage >>
84+
steps:
85+
- *publish-codecov
86+
- run:
87+
name: macOS
88+
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder Mac' clean build<<# parameters.test >> test <</ parameters.test >><<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >>
89+
- run:
90+
name: watchOS
91+
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder watchOS' -destination 'platform=watchOS Simulator,name=Apple Watch Series 3 - 42mm,OS=<< parameters.watchOS >>' clean build
92+
93+
workflows:
94+
workflow:
95+
jobs:
96+
- build-job:
97+
name: "Xcode_10.2_iOS_12"
98+
xcode: "10.2.0"
99+
iOS: "12.2"
100+
tvOS: "12.2"
101+
watchOS: "5.2"
102+
codecoverage: true
103+
- build-job:
104+
name: "Xcode_10.2_iOS_9"
105+
xcode: "10.2.0"
106+
iOS: "9.3"
107+
tvOS: "12.2"
108+
watchOS: "5.2"

Cartfile.private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" ~> 4.0
2-
github "AliSoftware/OHHTTPStubs" ~> 8.0
2+
github "linksmt/OHHTTPStubs" "563f48d3fab84ef04639649c770b00f4fa502cca"

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.6.0"
2-
github "AliSoftware/OHHTTPStubs" "8.0.0"
1+
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.10.0"
2+
github "linksmt/OHHTTPStubs" "563f48d3fab84ef04639649c770b00f4fa502cca"

MapboxGeocoder.xcodeproj/project.pbxproj

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,6 @@
11551155
PRODUCT_NAME = MapboxGeocoder;
11561156
SDKROOT = macosx;
11571157
SKIP_INSTALL = YES;
1158-
SWIFT_VERSION = 5.0;
11591158
VERSIONING_SYSTEM = "apple-generic";
11601159
VERSION_INFO_PREFIX = "";
11611160
};
@@ -1188,7 +1187,6 @@
11881187
SDKROOT = macosx;
11891188
SKIP_INSTALL = YES;
11901189
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1191-
SWIFT_VERSION = 5.0;
11921190
VERSIONING_SYSTEM = "apple-generic";
11931191
VERSION_INFO_PREFIX = "";
11941192
};
@@ -1213,7 +1211,6 @@
12131211
PRODUCT_NAME = MapboxGeocoderTests;
12141212
SDKROOT = macosx;
12151213
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1216-
SWIFT_VERSION = 5.0;
12171214
};
12181215
name = Debug;
12191216
};
@@ -1237,7 +1234,6 @@
12371234
PRODUCT_NAME = MapboxGeocoderTests;
12381235
SDKROOT = macosx;
12391236
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1240-
SWIFT_VERSION = 5.0;
12411237
};
12421238
name = Release;
12431239
};
@@ -1264,7 +1260,6 @@
12641260
PRODUCT_NAME = MapboxGeocoder;
12651261
SDKROOT = appletvos;
12661262
SKIP_INSTALL = YES;
1267-
SWIFT_VERSION = 5.0;
12681263
TARGETED_DEVICE_FAMILY = 3;
12691264
TVOS_DEPLOYMENT_TARGET = 9.0;
12701265
VERSIONING_SYSTEM = "apple-generic";
@@ -1297,7 +1292,6 @@
12971292
SDKROOT = appletvos;
12981293
SKIP_INSTALL = YES;
12991294
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1300-
SWIFT_VERSION = 5.0;
13011295
TARGETED_DEVICE_FAMILY = 3;
13021296
TVOS_DEPLOYMENT_TARGET = 9.0;
13031297
VERSIONING_SYSTEM = "apple-generic";
@@ -1322,7 +1316,6 @@
13221316
PRODUCT_NAME = MapboxGeocoderTests;
13231317
SDKROOT = appletvos;
13241318
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1325-
SWIFT_VERSION = 5.0;
13261319
TARGETED_DEVICE_FAMILY = "1,2,3";
13271320
TVOS_DEPLOYMENT_TARGET = 9.0;
13281321
};
@@ -1346,7 +1339,6 @@
13461339
PRODUCT_NAME = MapboxGeocoderTests;
13471340
SDKROOT = appletvos;
13481341
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1349-
SWIFT_VERSION = 5.0;
13501342
TARGETED_DEVICE_FAMILY = "1,2,3";
13511343
TVOS_DEPLOYMENT_TARGET = 9.0;
13521344
};
@@ -1372,7 +1364,6 @@
13721364
PRODUCT_NAME = MapboxGeocoder;
13731365
SDKROOT = watchos;
13741366
SKIP_INSTALL = YES;
1375-
SWIFT_VERSION = 5.0;
13761367
TARGETED_DEVICE_FAMILY = 4;
13771368
VERSIONING_SYSTEM = "apple-generic";
13781369
VERSION_INFO_PREFIX = "";
@@ -1402,7 +1393,6 @@
14021393
SDKROOT = watchos;
14031394
SKIP_INSTALL = YES;
14041395
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1405-
SWIFT_VERSION = 5.0;
14061396
TARGETED_DEVICE_FAMILY = 4;
14071397
VERSIONING_SYSTEM = "apple-generic";
14081398
VERSION_INFO_PREFIX = "";
@@ -1537,7 +1527,6 @@
15371527
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
15381528
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Geocoder.Swift;
15391529
PRODUCT_NAME = "Geocoder (Swift)";
1540-
SWIFT_VERSION = 5.0;
15411530
};
15421531
name = Debug;
15431532
};
@@ -1556,7 +1545,6 @@
15561545
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Geocoder.Swift;
15571546
PRODUCT_NAME = "Geocoder (Swift)";
15581547
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1559-
SWIFT_VERSION = 5.0;
15601548
};
15611549
name = Release;
15621550
};
@@ -1581,7 +1569,6 @@
15811569
PRODUCT_NAME = "$(TARGET_NAME)";
15821570
SKIP_INSTALL = YES;
15831571
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1584-
SWIFT_VERSION = 5.0;
15851572
TARGETED_DEVICE_FAMILY = "1,2,3";
15861573
VERSIONING_SYSTEM = "apple-generic";
15871574
VERSION_INFO_PREFIX = "";
@@ -1605,7 +1592,6 @@
16051592
PRODUCT_NAME = "$(TARGET_NAME)";
16061593
SKIP_INSTALL = YES;
16071594
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1608-
SWIFT_VERSION = 5.0;
16091595
TARGETED_DEVICE_FAMILY = "1,2,3";
16101596
VERSIONING_SYSTEM = "apple-generic";
16111597
VERSION_INFO_PREFIX = "";
@@ -1661,7 +1647,6 @@
16611647
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGeocoderTests;
16621648
PRODUCT_NAME = "$(TARGET_NAME)";
16631649
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1664-
SWIFT_VERSION = 5.0;
16651650
TARGETED_DEVICE_FAMILY = "1,2,3";
16661651
};
16671652
name = Debug;
@@ -1682,7 +1667,6 @@
16821667
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGeocoderTests;
16831668
PRODUCT_NAME = "$(TARGET_NAME)";
16841669
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1685-
SWIFT_VERSION = 5.0;
16861670
TARGETED_DEVICE_FAMILY = "1,2,3";
16871671
};
16881672
name = Release;

circle.yml

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)