-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CI, collect Code Coverage, Fix Xcode 10.2 build warnings #187
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e5bbb67
Update OHHTTPStubs to support Swift 5
s-faychatelard 8737aac
Convert project to Swift 5
s-faychatelard 2f2003c
Automatically fix warnings
s-faychatelard e80216c
Fix missing device family and swift 5 versions
s-faychatelard a1ae1d1
Upgrade CI config
frederoni 0d62944
Ignore code coverage in example and tests
frederoni 16bde56
Switch fork for OHHTTPStubs
frederoni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
version: 2.1 | ||
|
||
step-library: | ||
- &restore-cache | ||
restore_cache: | ||
keys: | ||
- cache-mbgeocoder-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cartfile.resolved" }} | ||
- cache-mbgeocoder-v1-{{ .Environment.CIRCLE_JOB }} # used if checksum fails | ||
|
||
- &save-cache | ||
save_cache: | ||
key: cache-mbgeocoder-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cartfile.resolved" }} | ||
paths: | ||
- Carthage | ||
|
||
- &prepare | ||
run: | ||
name: Prepare | ||
command: | | ||
curl -L https://github.com/Carthage/Carthage/releases/download/0.33.0/Carthage.pkg >> Carthage.pkg | ||
sudo installer -pkg Carthage.pkg -target / | ||
echo "foo" > ~/.mapbox | ||
|
||
- &publish-codecov | ||
run: | ||
name: Publish code coverage | ||
command: bash <(curl -s https://codecov.io/bash) | ||
|
||
jobs: | ||
build-job: | ||
parameters: | ||
xcode: | ||
type: string | ||
device: | ||
type: string | ||
default: "iPhone 6 Plus" | ||
iOS: | ||
type: string | ||
default: "12.1" | ||
watchOS: | ||
type: string | ||
default: "5.0" | ||
tvOS: | ||
type: string | ||
default: "12.0" | ||
test: | ||
type: boolean | ||
default: true | ||
codecoverage: | ||
type: boolean | ||
default: false | ||
macos: | ||
xcode: << parameters.xcode >> | ||
environment: | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
steps: | ||
- checkout | ||
- *prepare | ||
- run: | ||
name: Install prerequisites | ||
command: | | ||
if [ $(xcversion simulators | grep -cF "iOS << parameters.iOS >> Simulator (installed)") -eq 0 ]; then xcversion simulators --install="iOS << parameters.iOS >>" || true; fi | ||
- *restore-cache | ||
- run: | ||
name: Dependencies | ||
command: | | ||
carthage bootstrap --platform ios --cache-builds --configuration Debug --no-use-binaries | ||
carthage bootstrap --platform tvos --cache-builds --configuration Debug --no-use-binaries | ||
carthage bootstrap --platform macos --cache-builds --configuration Debug --no-use-binaries | ||
carthage bootstrap --platform watchos --cache-builds --configuration Debug --no-use-binaries | ||
- *save-cache | ||
- run: | ||
name: iOS | ||
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 >> | ||
- when: | ||
condition: << parameters.codecoverage >> | ||
steps: | ||
- *publish-codecov | ||
- run: | ||
name: tvOS | ||
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 >> | ||
- when: | ||
condition: << parameters.codecoverage >> | ||
steps: | ||
- *publish-codecov | ||
- run: | ||
name: macOS | ||
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder Mac' clean build<<# parameters.test >> test <</ parameters.test >><<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >> | ||
- run: | ||
name: watchOS | ||
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder watchOS' -destination 'platform=watchOS Simulator,name=Apple Watch Series 3 - 42mm,OS=<< parameters.watchOS >>' clean build | ||
|
||
workflows: | ||
workflow: | ||
jobs: | ||
- build-job: | ||
name: "Xcode_10.2_iOS_12" | ||
xcode: "10.2.0" | ||
iOS: "12.2" | ||
tvOS: "12.2" | ||
watchOS: "5.2" | ||
codecoverage: true | ||
- build-job: | ||
name: "Xcode_10.2_iOS_9" | ||
xcode: "10.2.0" | ||
iOS: "9.3" | ||
tvOS: "12.2" | ||
watchOS: "5.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" ~> 4.0 | ||
github "AliSoftware/OHHTTPStubs" ~> 6.0 | ||
github "frederoni/OHHTTPStubs" "563f48d3fab84ef04639649c770b00f4fa502cca" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.6.0" | ||
github "AliSoftware/OHHTTPStubs" "6.1.0" | ||
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.10.0" | ||
github "frederoni/OHHTTPStubs" "563f48d3fab84ef04639649c770b00f4fa502cca" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
MapboxGeocoder.xcodeproj/xcshareddata/xcschemes/Example (Objective-C).xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
MapboxGeocoder.xcodeproj/xcshareddata/xcschemes/Example (Swift).xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
MapboxGeocoder.xcodeproj/xcshareddata/xcschemes/MapboxGeocoder Mac.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
MapboxGeocoder.xcodeproj/xcshareddata/xcschemes/MapboxGeocoder iOS.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
MapboxGeocoder.xcodeproj/xcshareddata/xcschemes/MapboxGeocoder tvOS.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
MapboxGeocoder.xcodeproj/xcshareddata/xcschemes/MapboxGeocoder watchOS.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MapboxDirections.swift depends on a different fork for AliSoftware/OHHTTPStubs#286; we should be consistent one way or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll migrate to this fork in MapboxDirections.