Skip to content

Commit

Permalink
Update Swift 5 / Xcode 10.2 (#272)
Browse files Browse the repository at this point in the history
* Update Swift 5 / Xcode 10.2
Update macOS to 10.11
Update Test dependencies Swift 5
Fix Warnings
Removed ObjC Testing
Update Readme
Update Fastlane
PodSpec Minimum versions align with Xcode
* Update Libs
Force try to fix nil not <nil> in Swift 4.2
* Tweak codecov
* Change libs
* Add Minimum Swift Version
  • Loading branch information
cocojoe authored Apr 24, 2019
1 parent c90eeff commit 82c571e
Show file tree
Hide file tree
Showing 17 changed files with 196 additions and 121 deletions.
94 changes: 81 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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
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
Original file line number Diff line number Diff line change
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'
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
Loading

0 comments on commit 82c571e

Please sign in to comment.