Skip to content

Commit

Permalink
Merge pull request #395 from Rightpoint/ci-updates
Browse files Browse the repository at this point in the history
Use Xcode 12 on CircleCI and CocoaPods environment context
  • Loading branch information
chrisballinger committed Nov 10, 2020
2 parents f9f38fd + a17b179 commit d67fd95
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 43 deletions.
24 changes: 14 additions & 10 deletions .circleci/config.yml
Expand Up @@ -2,15 +2,17 @@ version: 2.1

jobs:
danger:
executor: xcode-11
executor: xcode-12
steps:
- setup
- run:
name: Install xchtmlreport
command: |
brew install --HEAD https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb
curl -O https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb
brew install --HEAD --build-from-source xchtmlreport.rb
- run:
name: Install xcparse
when: always
command: |
brew install chargepoint/xcparse/xcparse
- run:
Expand Down Expand Up @@ -53,13 +55,13 @@ jobs:
command: bash <(curl -s https://codecov.io/bash) -f build/BonMot-iOS/slather/cobertura.xml -X coveragepy -X gcov -X xcode

build-swift-package:
executor: xcode-11
executor: xcode-12
steps:
- setup
- run: swift build

test-swift-5-0:
executor: xcode-11
executor: xcode-12
environment:
SWIFT_VERSION: "5.0"
steps:
Expand All @@ -69,7 +71,7 @@ jobs:
swift-version: "5.0"

test-swift-4-2:
executor: xcode-11
executor: xcode-12
environment:
SWIFT_VERSION: "4.2"
steps:
Expand All @@ -79,7 +81,7 @@ jobs:
swift-version: "4.2"

carthage-build:
executor: xcode-11
executor: xcode-12
steps:
- checkout
- run:
Expand All @@ -88,19 +90,20 @@ jobs:
- run:
name: Update Carthage
command: brew outdated carthage || (brew uninstall carthage --force; brew install carthage --force-bottle)
- run: carthage build --no-skip-current && for platform in Mac iOS tvOS watchOS; do test -d Carthage/Build/${platform}/BonMot.framework || exit 1; done
# Carthage does not work on Xcode 12 https://github.com/Carthage/Carthage/issues/3019
# - run: carthage build --no-skip-current && for platform in Mac iOS tvOS watchOS; do test -d Carthage/Build/${platform}/BonMot.framework || exit 1; done

deploy-to-cocoapods:
executor: xcode-11
executor: xcode-12
steps:
- setup
- run: bundle exec pod trunk push


executors:
xcode-11:
xcode-12:
macos:
xcode: "11.7.0"
xcode: "12.1.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
Expand Down Expand Up @@ -162,6 +165,7 @@ workflows:
tags:
only: /.*/
- deploy-to-cocoapods:
context: CocoaPods
requires:
- danger
- build-swift-package
Expand Down
66 changes: 34 additions & 32 deletions Gemfile.lock
Expand Up @@ -2,34 +2,34 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
activesupport (4.2.11.3)
i18n (~> 0.7)
activesupport (5.2.4.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.4)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.372.0)
aws-sdk-core (3.107.0)
aws-partitions (1.388.0)
aws-sdk-core (3.109.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.38.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sdk-kms (1.39.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.81.0)
aws-sdk-core (~> 3, >= 3.104.3)
aws-sdk-s3 (1.83.1)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.3)
babosa (1.0.4)
circleci (2.0.3)
circleci_artifact (0.1.0)
circleci (~> 2.0)
Expand All @@ -39,15 +39,14 @@ GEM
nap
open4 (~> 1.3)
clamp (1.3.2)
cocoapods (1.9.3)
activesupport (>= 4.0.2, < 5)
cocoapods (1.10.0)
addressable (~> 2.6)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.9.3)
cocoapods-core (= 1.10.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
Expand All @@ -57,21 +56,22 @@ GEM
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.14.0, < 2.0)
cocoapods-core (1.9.3)
activesupport (>= 4.0.2, < 6)
xcodeproj (>= 1.19.0, < 2.0)
cocoapods-core (1.10.0)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.5.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
Expand All @@ -83,7 +83,7 @@ GEM
concurrent-ruby (1.1.7)
cork (0.3.0)
colored2 (~> 3.1)
danger (8.0.5)
danger (8.2.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand Down Expand Up @@ -113,13 +113,14 @@ GEM
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.0.0)
emoji_regex (3.2.1)
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
excon (0.76.0)
faraday (1.0.1)
excon (0.78.0)
faraday (1.1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
Expand All @@ -128,7 +129,7 @@ GEM
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.0)
fastlane (2.160.0)
fastlane (2.166.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
Expand Down Expand Up @@ -181,17 +182,17 @@ GEM
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.3)
google-cloud-env (1.4.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.28.0)
google-cloud-storage (1.29.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.1)
googleauth (0.14.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand All @@ -202,7 +203,7 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (0.9.5)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
json (2.3.1)
Expand All @@ -226,7 +227,7 @@ GEM
no_proxy_fix (0.1.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
octokit (4.18.0)
octokit (4.19.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
Expand All @@ -244,6 +245,7 @@ GEM
rexml (3.2.4)
rouge (2.0.7)
ruby-macho (1.4.0)
ruby2_keywords (0.0.2)
rubyzip (2.3.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
Expand Down Expand Up @@ -283,13 +285,13 @@ GEM
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.18.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
xcov (1.7.4)
xcov (1.7.5)
fastlane (>= 2.141.0, < 3.0.0)
multipart-post
slack-notifier
Expand Down
7 changes: 6 additions & 1 deletion Tests/BONFontBehaviorTests.swift
Expand Up @@ -64,7 +64,12 @@ class BONFontBehaviorTests: XCTestCase {
var attributes = UIFont(name: "Avenir-Roman", size: 10)!.fontDescriptor.fontAttributes
attributes[UIFontDescriptor.AttributeName.textStyle] = testTextStyle
let newAttributes = UIFont(descriptor: UIFontDescriptor(fontAttributes: attributes), size: 0).fontDescriptor.fontAttributes
XCTAssertEqual(newAttributes.count, 2)
if #available(iOS 14.0, tvOS 14.0, macOS 11.0, watchOS 7.0, *) {
XCTAssertEqual(newAttributes.count, 3)
}
else {
XCTAssertEqual(newAttributes.count, 2)
}
XCTAssertEqual(newAttributes["NSCTFontUIUsageAttribute"] as? BonMotTextStyle, testTextStyle)
XCTAssertEqual(newAttributes["NSFontSizeAttribute"] as? Int, 10)
}
Expand Down

0 comments on commit d67fd95

Please sign in to comment.