Skip to content

Commit 6d571ca

Browse files
committed
Upgrade CI to 2.1
1 parent ff2a458 commit 6d571ca

File tree

4 files changed

+105
-115
lines changed

4 files changed

+105
-115
lines changed

.circleci/config.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
version: 2.1
2+
3+
step-library:
4+
- &restore-cache
5+
restore_cache:
6+
keys:
7+
- carthage-cache-mbdirections-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cartfile.resolved" }}
8+
- carthage-cache-mbdirections-v1- # used if checksum fails
9+
10+
- &save-cache
11+
save_cache:
12+
key: carthage-cache-mbdirections-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cartfile.resolved" }}
13+
paths:
14+
- Carthage
15+
16+
- &prepare
17+
run:
18+
name: Prepare
19+
command: |
20+
git submodule sync
21+
if (brew outdated | grep carthage > /dev/null); then brew upgrade carthage; fi
22+
echo "foo" > ~/.mapbox
23+
24+
- &install-dependencies
25+
run:
26+
name: Install Dependencies
27+
command: |
28+
carthage bootstrap --platform ios --cache-builds --no-use-binaries
29+
carthage bootstrap --platform tvos --cache-builds --no-use-binaries
30+
carthage bootstrap --platform macos --cache-builds --no-use-binaries
31+
carthage bootstrap --platform watchos --cache-builds --no-use-binaries
32+
33+
- &publish-codecov
34+
run:
35+
name: Publish Code Coverage data
36+
command: bash <(curl -s https://codecov.io/bash)
37+
38+
jobs:
39+
build-job:
40+
parameters:
41+
xcode:
42+
type: string
43+
default: "10.1.0"
44+
device:
45+
type: string
46+
default: "iPhone 6 Plus"
47+
iOS:
48+
type: string
49+
default: "12.1"
50+
watchOS:
51+
type: string
52+
default: "5.0"
53+
tvOS:
54+
type: string
55+
default: "12.0"
56+
test:
57+
type: boolean
58+
default: true
59+
codecoverage:
60+
type: boolean
61+
default: false
62+
install_legacy_sim:
63+
type: boolean
64+
default: false
65+
macos:
66+
xcode: << parameters.xcode >>
67+
environment:
68+
HOMEBREW_NO_AUTO_UPDATE: 1
69+
steps:
70+
- checkout
71+
- *prepare
72+
- *restore-cache
73+
- when:
74+
condition: << parameters.install_legacy_sim >>
75+
steps:
76+
- run: xcversion simulators --install="iOS << parameters.iOS >>"
77+
- *install-dependencies
78+
- run:
79+
name: Build and Test SDK
80+
command: |
81+
xcodebuild -sdk iphonesimulator -project MapboxDirections.xcodeproj -scheme 'MapboxDirections iOS' -destination 'platform=iOS Simulator,<< parameters.iOS >>,name=<< parameters.device >>' clean build <<# parameters.test >>test <</ parameters.test >> <<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >>
82+
xcodebuild -sdk iphonesimulator -project MapboxDirections.xcodeproj -scheme 'MapboxDirections watchOS' -destination 'watchOS Simulator,name=Apple Watch Series 3 - 42mm,OS=<< parameters.iOS >>' clean build <<# parameters.test >>test <</ parameters.test >> <<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >>
83+
xcodebuild -project MapboxDirections.xcodeproj -scheme 'MapboxDirections Mac' clean build clean build <<# parameters.test >>test <</ parameters.test >> <<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >>
84+
xcodebuild -project MapboxDirections.xcodeproj -scheme 'MapboxDirections 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 >>
85+
- *save-cache
86+
87+
workflows:
88+
workflow:
89+
jobs:
90+
- build-job:
91+
name: "Xcode 10.2 iOS 12.2"
92+
xcode: "10.2.0"
93+
iOS: "12.2"
94+
- build-job:
95+
name: "Xcode 10.1 iOS 12.1"
96+
xcode: "10.1.0"
97+
iOS: "12.1"
98+
- build-job:
99+
name: "Xcode 9.4 iOS 11.2"
100+
xcode: "9.4.1"
101+
iOS: "11.4"
102+
watchOS: "4.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.4
2-
github "AliSoftware/OHHTTPStubs" ~> 6.0
2+
github "AliSoftware/OHHTTPStubs" ~> 7.0

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.8.0"
2-
github "AliSoftware/OHHTTPStubs" "6.1.0"
1+
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.9.0"
2+
github "AliSoftware/OHHTTPStubs" "7.0.0"
33
github "raphaelmor/Polyline" "v4.2.0"

circle.yml

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

0 commit comments

Comments
 (0)