Skip to content

Commit 995328f

Browse files
committed
Migrate to XCFrameworks
1 parent d80114b commit 995328f

File tree

12 files changed

+275
-225
lines changed

12 files changed

+275
-225
lines changed

.circleci/config.yml

Lines changed: 92 additions & 63 deletions
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,119 @@ 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: |
36+
bundle check || bundle install --without=development
3737
- save_cache:
38-
key: simplekeychain-gems-{{ checksum "Gemfile.lock" }}
38+
key: << parameters.scheme >>-v1-gems-{{ checksum "Gemfile.lock" }}
3939
paths:
4040
- vendor/bundle
41-
- run: |
42-
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
41+
- run:
42+
name: Enable code coverage
43+
command: grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g'
44+
- run:
45+
name: Save Xcode version
46+
command: xcodebuild -version | tee .xcode-version
4347
- restore_cache:
4448
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
49+
- << parameters.scheme >>-v1-carthage-{{ checksum "Cartfile.resolved" }}-{{ checksum ".xcode-version" }}
50+
- run:
51+
name: Install dependencies
52+
command: carthage bootstrap --use-xcframeworks --no-use-binaries --cache-builds
4953
- save_cache:
50-
key: simplekeychain-carthage-{ checksum "Cartfile.resolved" }}-<< parameters.xcode >>
54+
key: << parameters.scheme >>-v1-carthage-{{ checksum "Cartfile.resolved" }}-{{ checksum ".xcode-version" }}
5155
paths:
5256
- Carthage/Build
5357
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
58+
parameters:
59+
scheme:
60+
type: string
8061
steps:
81-
- checkout
82-
- prepare
83-
- test-ios
84-
- send-coverage-report
85-
- pod-lint
62+
- run:
63+
name: Run iOS tests
64+
command: bundle exec fastlane ios ci
65+
- run:
66+
name: Upload coverage report
67+
command: bash <(curl -s https://codecov.io/bash) -J '<< parameters.scheme >>'
68+
- run:
69+
name: Run pod lib lint
70+
command: bundle exec fastlane ios pod_lint
8671
- store_test_results:
8772
path: output/scan
8873
- store_artifacts:
8974
path: output
90-
build-and-test-macOS:
91-
executor: job-environment
75+
test-macos:
76+
parameters:
77+
scheme:
78+
type: string
9279
steps:
93-
- checkout
94-
- prepare
95-
- test-macos
96-
build-and-test-tvOS:
97-
executor: job-environment
80+
- run:
81+
name: Run macOS tests
82+
command: |
83+
xcodebuild test -scheme << parameters.scheme >>-OSX -destination 'platform=macOS,arch=x86_64' | xcpretty
84+
swift test
85+
test-tvos:
86+
parameters:
87+
scheme:
88+
type: string
89+
steps:
90+
- run:
91+
name: Run tvOS tests
92+
command: xcodebuild test -scheme << parameters.scheme >>-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
93+
94+
jobs:
95+
build-and-test:
96+
parameters:
97+
platform:
98+
type: string
99+
xcode:
100+
type: string
101+
scheme:
102+
type: string
103+
executor:
104+
name: macos-executor
105+
xcode: << parameters.xcode >>
98106
steps:
99107
- checkout
100-
- prepare
101-
- test-tvos
108+
- prepare:
109+
scheme: << parameters.scheme >>
110+
- when:
111+
condition:
112+
equal: [ios, << parameters.platform >>]
113+
steps:
114+
- test-ios:
115+
scheme: << parameters.scheme >>
116+
- when:
117+
condition:
118+
equal: [macos, << parameters.platform >>]
119+
steps:
120+
- test-macos:
121+
scheme: << parameters.scheme >>
122+
- when:
123+
condition:
124+
equal: [tvos, << parameters.platform >>]
125+
steps:
126+
- test-tvos:
127+
scheme: << parameters.scheme >>
102128

103129
workflows:
104130
build:
105131
jobs:
106-
- build-and-test-iOS
107-
- build-and-test-macOS
108-
- build-and-test-tvOS
132+
- build-and-test:
133+
scheme: "SimpleKeychain"
134+
matrix:
135+
parameters:
136+
platform: ["ios", "macos", "tvos"]
137+
xcode: ["13.0.0", "12.5.1"]

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cartfile.private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "Quick/Quick" ~> 3.0
1+
github "Quick/Quick" ~> 4.0
22
github "Quick/Nimble" ~> 9.0

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "Quick/Nimble" "v9.0.0"
2-
github "Quick/Quick" "v3.1.2"
1+
github "Quick/Nimble" "v9.2.1"
2+
github "Quick/Quick" "v4.0.0"

Gemfile

Lines changed: 1 addition & 2 deletions
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)

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
)
1919
],
2020
dependencies: [
21-
.package(name: "Quick", url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "3.0.0")),
21+
.package(name: "Quick", url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "4.0.0")),
2222
.package(name: "Nimble", url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "9.0.0"))
2323
],
2424
targets: [

README.md

Lines changed: 2 additions & 2 deletions
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)