Skip to content
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

Test Xcode 11.2 and SPM on Travis #62

Merged
merged 4 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/gemfiles/Gemfile.travis
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source 'https://rubygems.org'

gem 'xcpretty'
gem 'xcpretty-travis-formatter'
gem 'cocoapods', '1.7.0'
gem 'cocoapods', '~> 1.7'
39 changes: 18 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,37 @@ git:
jobs:
include:

###########################################
## Test RxGRDB Xcode 10.2

# Test RxGRDBmacOS (Xcode 10.2)
- stage: Test RxGRDB Xcode 10.2
- stage: Test Xcode 11.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
osx_image: xcode11.2
env:
- TID=RxGRDBOSX (Swift 5, macOS)
script: make test_framework_RxGRDBmacOS_maxSwift

# Test RxGRDBiOS (iOS <MAXIMUM VERSION>))
- stage: Test RxGRDB Xcode 10.2
- stage: Test Xcode 11.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
osx_image: xcode11.2
env:
- TID=RxGRDBiOS (Swift 5, iOS <MAX>)
script: make test_framework_RxGRDBiOS_maxTarget_maxSwift

# Test RxGRDBiOS (iOS <MINIMUM VERSION>))
- stage: Test RxGRDB Xcode 10.2

- stage: Test Xcode 11.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
osx_image: xcode11.2
env:
- TID=RxGRDBiOS (Swift 5, iOS <MIN>)
script: make test_framework_RxGRDBiOS_minTarget

###########################################
## Test Installation Methods

# CocoaPods Lint
- stage: Test Installation

- stage: Test Xcode 11.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode11.2
env:
- TID=RxGRDB [SPM] (macOS)
script: make test_SPM

- stage: Test Xcode 11.2
gemfile: .ci/gemfiles/Gemfile.travis
osx_image: xcode10.2
osx_image: xcode11.2
env:
- TID=CocoaPods (Xcode 10.2)
- TID=CocoaPods Lint
script: make test_CocoaPodsLint
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes

- [#60](https://github.com/RxSwiftCommunity/RxGRDB/pull/60) by [@sammygutierrez](https://github.com/sammygutierrez): Add SwiftPM support
- [#61](https://github.com/RxSwiftCommunity/RxGRDB/pull/61): Fix error handling of asynchronous writes
- [#62](https://github.com/RxSwiftCommunity/RxGRDB/pull/62): Test Xcode 11.2 and SPM on Travis


## 0.17.0
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GIT := $(shell command -v git)
POD := $(shell command -v pod)
XCRUN := $(shell command -v xcrun)
XCODEBUILD := set -o pipefail && $(shell command -v xcodebuild)
SWIFT = $(shell $(XCRUN) --find swift 2> /dev/null)

# Xcode Version Information
XCODEVERSION_FULL := $(word 2, $(shell xcodebuild -version))
Expand All @@ -35,7 +36,15 @@ XCPRETTY_PATH := $(shell command -v xcpretty 2> /dev/null)
TEST_ACTIONS = clean build build-for-testing test-without-building

# When adding support for an Xcode version, look for available devices with `instruments -s devices`
ifeq ($(XCODEVERSION),10.2)
ifeq ($(XCODEVERSION),11.3)
MAX_SWIFT_VERSION = 5.1
MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 11,OS=13.3"
MIN_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 5,OS=10.3.1"
else ifeq ($(XCODEVERSION),11.2)
MAX_SWIFT_VERSION = 5.1
MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 11,OS=13.2.2"
MIN_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 5,OS=10.3.1"
else ifeq ($(XCODEVERSION),10.2)
MAX_SWIFT_VERSION = 5
MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone XS,OS=12.2"
MIN_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 4s,OS=9.0"
Expand All @@ -61,13 +70,19 @@ ifeq ($(TRAVIS),true)
endif

# We test framework test suites, and if RxGRBD can be installed in an application:
test: test_framework test_install
test: test_SPM test_framework test_install

test_framework: test_framework_RxGRDB
test_framework_RxGRDB: test_framework_RxGRDBmacOS test_framework_RxGRDBiOS
test_framework_RxGRDBiOS: test_framework_RxGRDBiOS_minTarget test_framework_RxGRDBiOS_maxTarget
test_install: test_CocoaPodsLint

test_SPM:
$(SWIFT) package clean
$(SWIFT) build
$(SWIFT) build -c release
set -o pipefail && $(SWIFT) test $(XCPRETTY)

test_framework_RxGRDBmacOS: test_framework_RxGRDBmacOS_maxSwift test_framework_RxGRDBmacOS_minSwift

test_framework_RxGRDBmacOS_maxSwift: Pods
Expand Down