Skip to content

Commit 3d54357

Browse files
authored
Merge pull request #88 from auth0/update-swift-5-xcode-10.2
Update Swift 5 / Xcode 10.2
2 parents fd8695a + 00d765a commit 3d54357

File tree

9 files changed

+158
-75
lines changed

9 files changed

+158
-75
lines changed

.circleci/config.yml

+91-12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
version: 2
22
jobs:
3-
build-iOS-Swift-4.2:
3+
build-iOS-Swift-5.0:
44
macos:
5-
xcode: "10.0.0"
5+
xcode: "10.2.0"
66
environment:
77
LC_ALL: en_US.UTF-8
88
LANG: en_US.UTF-8
9+
HOMEBREW_LOGS: ~/homebrew-logs
10+
HOMEBREW_TEMP: ~/homebrew-temp
11+
HOMEBREW_NO_AUTO_UPDATE: 1
912
steps:
1013
- checkout
1114
- run: |
@@ -30,19 +33,22 @@ jobs:
3033
- Carthage/Build
3134
- store_test_results:
3235
path: fastlane/test_output
33-
build-iOS-Swift-4.0:
36+
build-iOS-Swift-4.2:
3437
macos:
35-
xcode: "10.0.0"
38+
xcode: "10.2.0"
3639
environment:
3740
LC_ALL: en_US.UTF-8
3841
LANG: en_US.UTF-8
42+
HOMEBREW_LOGS: ~/homebrew-logs
43+
HOMEBREW_TEMP: ~/homebrew-temp
44+
HOMEBREW_NO_AUTO_UPDATE: 1
3945
steps:
4046
- checkout
4147
- run: |
4248
brew install swiftlint
4349
bundle install --without=development
4450
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
45-
sed -i "" 's/SWIFT_VERSION = 4.2/SWIFT_VERSION = 4.0/g' "JWTDecode.xcodeproj/project.pbxproj"
51+
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' "JWTDecode.xcodeproj/project.pbxproj"
4652
- run:
4753
name: Bootstrap
4854
command: bundle exec fastlane ios bootstrap
@@ -53,24 +59,30 @@ jobs:
5359
SCHEME: JWTDecode-iOS
5460
DEVICE: iPhone 8
5561
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2
62+
- run: |
63+
bash <(curl -s https://codecov.io/bash) -J 'JWTDecode'
5664
- save_cache:
5765
key: dependency-cache
5866
paths:
5967
- Carthage/Build
60-
build-iOS-Swift-3.0:
68+
- store_test_results:
69+
path: fastlane/test_output
70+
build-iOS-Swift-4.0:
6171
macos:
62-
xcode: "9.4.1"
72+
xcode: "10.2.0"
6373
environment:
6474
LC_ALL: en_US.UTF-8
6575
LANG: en_US.UTF-8
76+
HOMEBREW_LOGS: ~/homebrew-logs
77+
HOMEBREW_TEMP: ~/homebrew-temp
78+
HOMEBREW_NO_AUTO_UPDATE: 1
6679
steps:
6780
- checkout
6881
- run: |
6982
brew install swiftlint
70-
sudo gem install bundler
7183
bundle install --without=development
7284
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
73-
sed -i "" 's/SWIFT_VERSION = 4.2/SWIFT_VERSION = 3.3/g' "JWTDecode.xcodeproj/project.pbxproj"
85+
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.0/g' "JWTDecode.xcodeproj/project.pbxproj"
7486
- run:
7587
name: Bootstrap
7688
command: bundle exec fastlane ios bootstrap
@@ -85,18 +97,54 @@ jobs:
8597
key: dependency-cache
8698
paths:
8799
- Carthage/Build
100+
build-macOS-Swift-5.0:
101+
macos:
102+
xcode: "10.2.0"
103+
environment:
104+
LC_ALL: en_US.UTF-8
105+
LANG: en_US.UTF-8
106+
HOMEBREW_LOGS: ~/homebrew-logs
107+
HOMEBREW_TEMP: ~/homebrew-temp
108+
HOMEBREW_NO_AUTO_UPDATE: 1
109+
steps:
110+
- checkout
111+
- run: |
112+
brew install swiftlint
113+
bundle install --without=development
114+
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
115+
- run:
116+
name: Bootstrap
117+
command: carthage bootstrap --platform mac
118+
- run:
119+
name: Setup Keychain
120+
command: |
121+
security create-keychain -p circle cikeychain
122+
security list-keychains -d user -s "/Users/distiller/Library/Keychains/xcode.keychain-db" /Users/distiller/Library/Keychains/cikeychain-db
123+
security default-keychain -s /Users/distiller/Library/Keychains/cikeychain-db
124+
security unlock-keychain -p circle "/Users/distiller/Library/Keychains/cikeychain-db"
125+
- run:
126+
name: Run test suite
127+
command: xcodebuild test -scheme JWTDecode-OSX -destination 'platform=macOS,arch=x86_64' | xcpretty
128+
- save_cache:
129+
key: dependency-cache
130+
paths:
131+
- Carthage/Build
88132
build-macOS-Swift-4.2:
89133
macos:
90-
xcode: "10.0.0"
134+
xcode: "10.2.0"
91135
environment:
92136
LC_ALL: en_US.UTF-8
93137
LANG: en_US.UTF-8
138+
HOMEBREW_LOGS: ~/homebrew-logs
139+
HOMEBREW_TEMP: ~/homebrew-temp
140+
HOMEBREW_NO_AUTO_UPDATE: 1
94141
steps:
95142
- checkout
96143
- run: |
97144
brew install swiftlint
98145
bundle install --without=development
99146
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
147+
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' "JWTDecode.xcodeproj/project.pbxproj"
100148
- run:
101149
name: Bootstrap
102150
command: carthage bootstrap --platform mac
@@ -114,18 +162,47 @@ jobs:
114162
key: dependency-cache
115163
paths:
116164
- Carthage/Build
165+
build-tvOS-Swift-5.0:
166+
macos:
167+
xcode: "10.2.0"
168+
environment:
169+
LC_ALL: en_US.UTF-8
170+
LANG: en_US.UTF-8
171+
HOMEBREW_LOGS: ~/homebrew-logs
172+
HOMEBREW_TEMP: ~/homebrew-temp
173+
HOMEBREW_NO_AUTO_UPDATE: 1
174+
steps:
175+
- checkout
176+
- run: |
177+
brew install swiftlint
178+
bundle install --without=development
179+
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
180+
- run:
181+
name: Bootstrap
182+
command: carthage bootstrap --platform tvOS
183+
- run:
184+
name: Run test suite
185+
command: xcodebuild test -scheme JWTDecode-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
186+
- save_cache:
187+
key: dependency-cache
188+
paths:
189+
- Carthage/Build
117190
build-tvOS-Swift-4.2:
118191
macos:
119-
xcode: "10.0.0"
192+
xcode: "10.2.0"
120193
environment:
121194
LC_ALL: en_US.UTF-8
122195
LANG: en_US.UTF-8
196+
HOMEBREW_LOGS: ~/homebrew-logs
197+
HOMEBREW_TEMP: ~/homebrew-temp
198+
HOMEBREW_NO_AUTO_UPDATE: 1
123199
steps:
124200
- checkout
125201
- run: |
126202
brew install swiftlint
127203
bundle install --without=development
128204
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
205+
sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' "JWTDecode.xcodeproj/project.pbxproj"
129206
- run:
130207
name: Bootstrap
131208
command: carthage bootstrap --platform tvOS
@@ -141,8 +218,10 @@ workflows:
141218
version: 2
142219
build:
143220
jobs:
221+
- build-iOS-Swift-5.0
144222
- build-iOS-Swift-4.2
145223
- build-iOS-Swift-4.0
146-
- build-iOS-Swift-3.0
224+
- build-macOS-Swift-5.0
147225
- build-macOS-Swift-4.2
226+
- build-tvOS-Swift-5.0
148227
- build-tvOS-Swift-4.2

.swift-version

-1
This file was deleted.

Cartfile.private

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "Quick/Quick" ~> 1.3
2-
github "Quick/Nimble" ~> 7.1
1+
github "Quick/Quick" ~> 2.1
2+
github "Quick/Nimble" ~> 8.0

Cartfile.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "Quick/Nimble" "v7.3.1"
2-
github "Quick/Quick" "v1.3.2"
1+
github "Quick/Nimble" "v8.0.1"
2+
github "Quick/Quick" "v2.1.0"

0 commit comments

Comments
 (0)