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

Added Swift 5 / Xcode 10.2 Support #272

Merged
merged 5 commits into from Apr 24, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
94 changes: 81 additions & 13 deletions .circleci/config.yml
@@ -1,13 +1,14 @@
version: 2
jobs:
build-iOS-Swift-4.2:
build-iOS-Swift-5.0:
macos:
xcode: "10.0.0"
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
Copy link
Member Author

@cocojoe cocojoe Apr 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need this as the CI image fo 10.2.0 is on MacOS 10.14.3. However, brew now required 10.14.4 to build packages such as swiftlint. This should be fixed on Circle CI side at some point in the near future when they upgrade base image to 10.14.4

steps:
- checkout
- run: |
Expand All @@ -32,21 +33,22 @@ jobs:
- Carthage/Build
- store_test_results:
path: fastlane/test_output
build-iOS-Swift-4.0:
build-iOS-Swift-4.2:
macos:
xcode: "10.0.0"
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run: |
brew install swiftlint
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
sed -i "" 's/SWIFT_VERSION = 4.2/SWIFT_VERSION = 4.0/g' "Auth0.xcodeproj/project.pbxproj"
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' "Auth0.xcodeproj/project.pbxproj"
- run:
name: Bootstrap
command: bundle exec fastlane ios bootstrap
Expand All @@ -57,27 +59,30 @@ jobs:
SCHEME: Auth0.iOS
DEVICE: iPhone 8
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2
- run: |
bash <(curl -s https://codecov.io/bash) -J 'Auth0'
- save_cache:
key: dependency-cache
paths:
- Carthage/Build
build-iOS-Swift-3.0:
- store_test_results:
path: fastlane/test_output
build-iOS-Swift-4.0:
macos:
xcode: "9.4.1"
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run: |
brew update
brew install swiftlint
sudo gem install bundler
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
sed -i "" 's/SWIFT_VERSION = 4.2/SWIFT_VERSION = 3.3/g' "Auth0.xcodeproj/project.pbxproj"
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.0/g' "Auth0.xcodeproj/project.pbxproj"
- run:
name: Bootstrap
command: bundle exec fastlane ios bootstrap
Expand All @@ -92,20 +97,54 @@ jobs:
key: dependency-cache
paths:
- Carthage/Build
build-macOS-Swift-5.0:
macos:
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run: |
brew install swiftlint
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
- run:
name: Bootstrap
command: carthage bootstrap --platform mac
- run:
name: Setup Keychain
command: |
security create-keychain -p circle cikeychain
security list-keychains -d user -s "/Users/distiller/Library/Keychains/xcode.keychain-db" /Users/distiller/Library/Keychains/cikeychain-db
security default-keychain -s /Users/distiller/Library/Keychains/cikeychain-db
security unlock-keychain -p circle "/Users/distiller/Library/Keychains/cikeychain-db"
- run:
name: Run test suite
command: xcodebuild test -scheme Auth0.macOS -destination 'platform=macOS,arch=x86_64' | xcpretty
- save_cache:
key: dependency-cache
paths:
- Carthage/Build
build-macOS-Swift-4.2:
macos:
xcode: "10.0.0"
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run: |
brew install swiftlint
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' "Auth0.xcodeproj/project.pbxproj"
- run:
name: Bootstrap
command: carthage bootstrap --platform mac
Expand All @@ -123,20 +162,47 @@ jobs:
key: dependency-cache
paths:
- Carthage/Build
build-tvOS-Swift-5.0:
macos:
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run: |
brew install swiftlint
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
- run:
name: Bootstrap
command: carthage bootstrap --platform tvOS
- run:
name: Run test suite
command: xcodebuild test -scheme Auth0.tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
- save_cache:
key: dependency-cache
paths:
- Carthage/Build
build-tvOS-Swift-4.2:
macos:
xcode: "10.0.0"
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
HOMEBREW_LOGS: ~/homebrew-logs
HOMEBREW_TEMP: ~/homebrew-temp
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run: |
brew install swiftlint
bundle install --without=development
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' "Auth0.xcodeproj/project.pbxproj"
- run:
name: Bootstrap
command: carthage bootstrap --platform tvOS
Expand All @@ -152,8 +218,10 @@ workflows:
version: 2
build:
jobs:
- build-iOS-Swift-5.0
- build-iOS-Swift-4.2
- build-iOS-Swift-4.0
- build-iOS-Swift-3.0
- build-macOS-Swift-5.0
- build-macOS-Swift-4.2
- build-tvOS-Swift-5.0
- build-tvOS-Swift-4.2
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

4 changes: 3 additions & 1 deletion Auth0.podspec
Expand Up @@ -54,7 +54,7 @@ Pod::Spec.new do |s|
s.social_media_url = 'https://twitter.com/auth0'

s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.osx.deployment_target = '10.11'
Copy link
Member Author

@cocojoe cocojoe Apr 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current macOS 10.14, 10.10 was release October 16, 2014
Related to #269, this is a potential BC, although should be minimal impact.

s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'
s.requires_arc = true
Expand All @@ -71,4 +71,6 @@ Pod::Spec.new do |s|
s.tvos.source_files = 'Auth0/*.swift'
s.tvos.exclude_files = web_auth_files
s.tvos.dependency 'SimpleKeychain'

s.swift_version = '4.0'
end