Skip to content

Commit 1864e72

Browse files
author
Steve Hobbs
authored
Merge pull request #117 from auth0/chore/xcframeworks
Migrate to XCFrameworks [SDK-2802]
2 parents e3cae14 + e41bf49 commit 1864e72

File tree

8 files changed

+261
-223
lines changed

8 files changed

+261
-223
lines changed

.circleci/config.yml

+88-63
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
version: 2.1
22

33
executors:
4-
job-environment:
4+
macos-executor:
5+
parameters:
6+
xcode:
7+
type: string
58
shell: /bin/bash --login -eo pipefail
69
macos:
7-
xcode: 11.7.0
10+
xcode: << parameters.xcode >>
811
environment:
912
LC_ALL: en_US.UTF-8
1013
LANG: en_US.UTF-8
@@ -16,93 +19,115 @@ executors:
1619
HOMEBREW_NO_AUTO_UPDATE: 1
1720
HOMEBREW_NO_INSTALL_CLEANUP: 1
1821
FL_OUTPUT_DIR: output
22+
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2
1923

2024
commands:
2125
prepare:
2226
parameters:
23-
ruby:
27+
scheme:
2428
type: string
25-
default: "2.7.1p83"
26-
xcode:
27-
type: string
28-
default: "11.7.0"
2929
steps:
3030
- restore_cache:
3131
keys:
32-
- simplekeychain-gems-{{ checksum "Gemfile.lock" }}
33-
- simplekeychain-gems-
34-
- run: |
35-
echo "ruby-<< parameters.ruby >>" > ~/.ruby-version
36-
bundle check || bundle install --without=development
32+
- << parameters.scheme >>-v1-gems-{{ checksum "Gemfile.lock" }}
33+
- run:
34+
name: Install gems
35+
command: bundle check || bundle install --without=development
3736
- save_cache:
38-
key: simplekeychain-gems-{{ checksum "Gemfile.lock" }}
37+
key: << parameters.scheme >>-v1-gems-{{ checksum "Gemfile.lock" }}
3938
paths:
4039
- vendor/bundle
41-
- run: |
42-
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
40+
- run:
41+
name: Save Xcode version
42+
command: xcodebuild -version | tee .xcode-version
4343
- restore_cache:
4444
keys:
45-
- simplekeychain-carthage-{ checksum "Cartfile.resolved" }}-<< parameters.xcode >>
46-
- simplekeychain-carthage-{ checksum "Cartfile.resolved" }}
47-
- simplekeychain-carthage-
48-
- run: carthage bootstrap --no-use-binaries --cache-builds
45+
- << parameters.scheme >>-v1-carthage-{{ checksum "Cartfile.resolved" }}-{{ checksum ".xcode-version" }}
46+
- run:
47+
name: Install dependencies
48+
command: carthage bootstrap --use-xcframeworks --no-use-binaries --cache-builds
4949
- save_cache:
50-
key: simplekeychain-carthage-{ checksum "Cartfile.resolved" }}-<< parameters.xcode >>
50+
key: << parameters.scheme >>-v1-carthage-{{ checksum "Cartfile.resolved" }}-{{ checksum ".xcode-version" }}
5151
paths:
5252
- Carthage/Build
5353
test-ios:
54-
steps:
55-
- run: bundle exec fastlane ios ci
56-
pod-lint:
57-
steps:
58-
- run: bundle exec fastlane ios pod_lint
59-
send-coverage-report:
60-
steps:
61-
- run: bash <(curl -s https://codecov.io/bash) -J 'SimpleKeychain'
62-
test-macos:
63-
steps:
64-
- run: |
65-
security create-keychain -p circle cikeychain
66-
security list-keychains -d user -s "/Users/distiller/Library/Keychains/xcode.keychain-db" /Users/distiller/Library/Keychains/cikeychain-db
67-
security default-keychain -s /Users/distiller/Library/Keychains/cikeychain-db
68-
security unlock-keychain -p circle "/Users/distiller/Library/Keychains/cikeychain-db"
69-
xcodebuild test -scheme SimpleKeychain-OSX -destination 'platform=macOS,arch=x86_64' | xcpretty
70-
swift test
71-
test-tvos:
72-
steps:
73-
- run: xcodebuild test -scheme 'SimpleKeychain-tvOS' -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
74-
75-
jobs:
76-
build-and-test-iOS:
77-
executor: job-environment
78-
environment:
79-
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2
54+
parameters:
55+
scheme:
56+
type: string
8057
steps:
81-
- checkout
82-
- prepare
83-
- test-ios
84-
- send-coverage-report
85-
- pod-lint
58+
- run:
59+
name: Run iOS tests
60+
command: bundle exec fastlane ios ci
61+
- run:
62+
name: Upload coverage report
63+
command: bash <(curl -s https://codecov.io/bash) -J '<< parameters.scheme >>'
64+
- run:
65+
name: Run pod lib lint
66+
command: bundle exec fastlane ios pod_lint
8667
- store_test_results:
8768
path: output/scan
8869
- store_artifacts:
8970
path: output
90-
build-and-test-macOS:
91-
executor: job-environment
71+
test-macos:
72+
parameters:
73+
scheme:
74+
type: string
9275
steps:
93-
- checkout
94-
- prepare
95-
- test-macos
96-
build-and-test-tvOS:
97-
executor: job-environment
76+
- run:
77+
name: Run macOS tests
78+
command: |
79+
xcodebuild test -scheme << parameters.scheme >>-OSX -destination 'platform=macOS,arch=x86_64' | xcpretty
80+
swift test
81+
test-tvos:
82+
parameters:
83+
scheme:
84+
type: string
85+
steps:
86+
- run:
87+
name: Run tvOS tests
88+
command: xcodebuild test -scheme << parameters.scheme >>-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
89+
90+
jobs:
91+
build-and-test:
92+
parameters:
93+
platform:
94+
type: string
95+
xcode:
96+
type: string
97+
scheme:
98+
type: string
99+
executor:
100+
name: macos-executor
101+
xcode: << parameters.xcode >>
98102
steps:
99103
- checkout
100-
- prepare
101-
- test-tvos
104+
- prepare:
105+
scheme: << parameters.scheme >>
106+
- when:
107+
condition:
108+
equal: [ios, << parameters.platform >>]
109+
steps:
110+
- test-ios:
111+
scheme: << parameters.scheme >>
112+
- when:
113+
condition:
114+
equal: [macos, << parameters.platform >>]
115+
steps:
116+
- test-macos:
117+
scheme: << parameters.scheme >>
118+
- when:
119+
condition:
120+
equal: [tvos, << parameters.platform >>]
121+
steps:
122+
- test-tvos:
123+
scheme: << parameters.scheme >>
102124

103125
workflows:
104126
build:
105127
jobs:
106-
- build-and-test-iOS
107-
- build-and-test-macOS
108-
- build-and-test-tvOS
128+
- build-and-test:
129+
scheme: "SimpleKeychain"
130+
matrix:
131+
parameters:
132+
platform: ["ios", "macos", "tvos"]
133+
xcode: ["13.0.0", "12.5.1"]

Gemfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
source 'https://rubygems.org'
22

3-
gem 'cocoapods'
4-
gem 'xcpretty'
53
gem 'fastlane'
4+
gem 'cocoapods'
65

76
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
87
eval_gemfile(plugins_path) if File.exist?(plugins_path)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ A wrapper to make it really easy to deal with iOS Keychain and store your user's
2929
## Requirements
3030

3131
- iOS 9.0+ / macOS 10.11+ / tvOS 9.0+ / watchOS 2.0+
32-
- Xcode 11.4+ / 12.x
32+
- Xcode 12.x / 13.x
3333
- Swift 4.x / 5.x
3434

3535
## Installation
@@ -54,7 +54,7 @@ If you are using [Carthage](https://github.com/Carthage/Carthage), add the follo
5454
github "auth0/SimpleKeychain"
5555
```
5656

57-
Then run `carthage bootstrap`.
57+
Then run `carthage bootstrap --use-xcframeworks`.
5858

5959
> For more information about Carthage usage, check [their official documentation](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).
6060

0 commit comments

Comments
 (0)