Skip to content

Commit

Permalink
Update dependencies/toolchain (#286)
Browse files Browse the repository at this point in the history
* Use ruby 3.1.3

* remove some gems and update the rest

moved some to Brewfile

* use iOS 13 as deployment target

* Update Xcode settings

* disable user script sandboxing

* update cocoapods

* show alerts with extension instead of helper class

* Resolve syntax issues in tests

* replace in iOS 13 deprecated keyWindow

* update deployment target in podspec

* save storyboards with Xcode 15

* define main example color in assets

* disable controller based status bar appearance

* refactor navigation bar appearance configuration

* fix navigation bar appearance

* remove unused code

* update formatting

* update bundler

* fix linter issues, adjust formatting accordingly

* remove obsolete UITests reference from example scheme

* update simulator used for testing

* update project hash in example podfile lock

* resolve some linter issues

* remove obsolete code

* add iPhone 15 Pro Max to CircleCI tests

disable others for now

* Update circle ci config

* use macos orb to select ruby version

* use correct ruby version on circle ci

* use m1 mac on circleci

* skip change-ruby on circle ci

* m1 not available for free plan on circle ci

* use ruby 3.1.4

* cleanup circle ci config

* reinstall xcode-install

* remove cocoapods specs mirror

* cleanup circle ci config

* replace deprecated instruments tool

* skip install/start simulator on circle ci

* install homebrew packages on circle ci

* use iOS 17.0.1 runtime on circle ci

* update ruby gems

* skip simulator install on circleci

* switch to iOS 15.1 on circle ci

* fix circle ci config

* reintegrate cocoapods

* update ruby gems

* test on ios 17.2 by default

* import XCTest in testfiles

* regenerate all existing reference images

* add reference images for iPhone 15 Pro Max

* run ci tests on multiple xcode versions

* run default tests on iphone 15 pro max

* use ruby 3.1.4 on circle ci

* install ruby on circle ci without the ruby orb

* use macos orb to switch ruby on circle ci

* only use macos versions with ruby 3.1.4

* rename step in circleci config

* use UIColor.named instead of UIColor.resource

* test on iphone se instead of iphone 7

* switch to standard snapshot syntax

* add reference image for iphone se

* set pixel tolerance for some snapshot tests

* unify pixel tolerance

* fix circleci setup

* add screenshots for older xcode versions

* store snapshot test artifacts

* switch to CDN for cocoapods

* copy snapshot artifacts in rake file

* only copy snapshots when tests fail

* fix iPhone 14 reference image

* remove snapshot artifact storing

* Update README

* update codecove on newest simulator

* cleanup circleci config

* Use us english throughout the app

* fix example app color
  • Loading branch information
jjochen authored Jan 5, 2024
1 parent 60fcde6 commit 0f26d02
Show file tree
Hide file tree
Showing 120 changed files with 880 additions and 720 deletions.
169 changes: 70 additions & 99 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
version: 2.1
orbs:
macos: circleci/macos@2

executors:

simulator:
default:
parameters:
xcode:
type: string
default: '11.3.1'
default: '15.1.0'
os:
type: string
default: '13.3'
default: '17.2'
device:
type: string
default: iPhone 11 Pro Max
default: iPhone 15 Pro Max
macos:
xcode: << parameters.xcode >>
shell: /bin/bash --login -eo pipefail
environment:
SIMULATOR_OS: << parameters.os >>
DESTINATION: platform=iOS Simulator,OS=<< parameters.os >>,name=<< parameters.device >>
SIMULATOR_DEVICE: << parameters.device >>
DESTINATION: platform=iOS Simulator,name=<< parameters.device >>,OS=<< parameters.os >>
SIMULATOR: << parameters.device >> (<< parameters.os >>) [

default: simulator
HOMEBREW_NO_AUTO_UPDATE: 1


commands:
Expand Down Expand Up @@ -52,12 +54,18 @@ commands:

# System steps

change-ruby:
description: Select the correct version of ruby
setup-homebrew:
description: Bundle homebrew packages
steps:
- run:
name: Set Ruby Version
command: echo 'chruby ruby-2.6' >> ~/.bash_profile
name: Run brew bundle
command: brew bundle

switch-ruby:
description: Switch to ruby 3.1.4
steps:
- macos/switch-ruby:
version: "3.1.4"

update-bundler:
description: Update bundler to newest version
Expand Down Expand Up @@ -92,29 +100,20 @@ commands:
paths:
- vendor/bundle

install-simulator:
description: Install simulator runtime
steps:
- run:
name: List simulators
command: bundle exec xcversion simulators
- run:
name: Install simulator
command: bundle exec xcversion simulators --install="iOS $SIMULATOR_OS Simulator" --no-progress || true

start-simulator:
description: Start simulator
steps:
- run:
name: Start simulator
command: xcrun instruments -w "$SIMULATOR" || true

fetch-cocoapods-specs:
description: Fetch CocoaPods repository from S3
steps:
- run:
name: Fetch CocoaPods Specs
command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
# install-simulator:
# description: Install simulator runtime
# steps:
# - run:
# name: Install simulator
# command: xcodes runtimes install "iOS $SIMULATOR_OS"

# start-simulator:
# description: Start simulator
# steps:
# - macos/preboot-simulator:
# version: {{ $SIMULATOR_OS }}
# platform: "iOS"
# device: {{ $SIMULATOR_DEVICE }}

restore-pods-cache:
description: Restore pods directory from cache
Expand Down Expand Up @@ -154,7 +153,7 @@ commands:
setup-gems:
description: Update bundler and install gems
steps:
- change-ruby
- switch-ruby
- update-bundler
- restore-gem-cache
- bundle-install
Expand All @@ -163,15 +162,11 @@ commands:
setup-cocoapods:
description: Fetch specs and install cocoapods
steps:
- fetch-cocoapods-specs
- restore-pods-cache
- install-cocoapods
- save-pods-cache


# Rake tasks

run-tests:
run-tests-task:
description: Run tests on sepcific device
steps:
- run-rake-task:
Expand All @@ -184,19 +179,19 @@ commands:
name: Update Codecov
command: bash <(curl -s https://codecov.io/bash)

lint-podspec:
run-lint-podspec-task:
description: Lint Podspec
steps:
- run-rake-task:
task: lint_podspec

generate-documentation:
run-generate-documentation-task:
description: Build Documentation
steps:
- run-rake-task:
task: generate_documentation

generate-changelog:
run-generate-changelog-task:
description: Generate Changelog
steps:
- run-rake-task:
Expand Down Expand Up @@ -241,16 +236,13 @@ commands:
- run-rake-task:
task: close_github_milestone

push-podspec:
run-push-podspec-task:
description: Push Podspec to trunk
steps:
- run-rake-task:
task: push_podspec


# Tests

swiftlint:
run-swiftlint:
description: Run Swiftlint
steps:
- run:
Expand Down Expand Up @@ -292,93 +284,75 @@ aliases:

jobs:

build-and-test-ios13-iphone11promax:
build-and-test-ios17-iphone15promax:
executor:
name: simulator
xcode: '11.3.1'
os: '13.3'
device: iPhone 11 Pro Max
name: default
xcode: '15.1.0'
os: '17.2'
device: iPhone 15 Pro Max
steps:
- checkout
- setup-homebrew
- setup-gems
- install-simulator
- start-simulator
- setup-cocoapods
- run-tests
- store-test-reports

build-and-test-ios12-iphonexsmax:
executor:
name: simulator
xcode: '10.3.0'
os: '12.4'
device: iPhone Xs Max
steps:
- checkout
- setup-gems
- install-simulator
- start-simulator
- setup-cocoapods
- run-tests
- run-tests-task
- update-codecov
- store-test-reports

build-and-test-ios11-iphonex:
build-and-test-ios16-iphone14:
executor:
name: simulator
os: '11.4'
device: iPhone X
name: default
xcode: '14.3.1'
os: '16.4'
device: iPhone 14
steps:
- checkout
- setup-gems
- install-simulator
- start-simulator
- setup-cocoapods
- run-tests
- run-tests-task
- store-test-reports

build-and-test-ios10-iphone7:
build-and-test-ios15-iphonese:
executor:
name: simulator
os: '10.3.1'
device: iPhone 7
name: default
xcode: '14.3.1'
os: '15.5'
device: iPhone SE (3rd generation)
steps:
- checkout
- setup-gems
- install-simulator
- start-simulator
- setup-cocoapods
- run-tests
- run-tests-task
- store-test-reports

lint-podspec:
executor: default
steps:
- checkout
- setup-gems
- lint-podspec
- run-lint-podspec-task

build-documentation:
executor: default
steps:
- checkout
- setup-gems
- setup-cocoapods
- generate-documentation
- run-generate-documentation-task

generate-changelog:
executor: default
steps:
- checkout
- setup-gems
- generate-changelog
- run-generate-changelog-task

swiftlint:
docker:
- image: dantoml/swiftlint:latest
steps:
- checkout
- swiftlint
- run-swiftlint
- store-lint-reports

create-major-release-pull-request:
Expand Down Expand Up @@ -425,30 +399,27 @@ jobs:
- checkout
- setup-gems
- setup-cocoapods
- push-podspec
- run-push-podspec-task


workflows:
version: 2.1

run-tests:
jobs:
- lint-podspec
- swiftlint
- build-and-test-ios13-iphone11promax
- build-and-test-ios12-iphonexsmax
- build-and-test-ios11-iphonex
- build-and-test-ios10-iphone7
- build-and-test-ios17-iphone15promax
- build-and-test-ios16-iphone14
- build-and-test-ios15-iphonese
- build-documentation
- generate-changelog
- create-version-tag:
requires:
- lint-podspec
- swiftlint
- build-and-test-ios13-iphone11promax
- build-and-test-ios12-iphonexsmax
- build-and-test-ios11-iphonex
- build-and-test-ios10-iphone7
- build-and-test-ios17-iphone15promax
- build-and-test-ios16-iphone14
- build-and-test-ios15-iphonese
- build-documentation
- generate-changelog
filters:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGONRE THE LOCK FILE
Pods/

### Homebrew ###
# Homebrew lock file
Brewfile.lock.json

### fastlane ###
# fastlane - A streamlined workflow tool for Cocoa deployment
#
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.6
ruby-3.1.4
17 changes: 14 additions & 3 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# file options

--exclude Example/Pods

# format options

--allman false
--binarygrouping none
--closingparen balanced
Expand All @@ -7,7 +13,6 @@
--disable redundantFileprivate, redundantObjc
--elseposition same-line
--empty void
--exclude Example/Pods, Package.swift
--exponentcase lowercase
--exponentgrouping disabled
--fractiongrouping disabled
Expand All @@ -27,7 +32,13 @@
--selfrequired
--semicolons inline
--stripunusedargs always
--swiftversion 4.2
--swiftversion 5.0
--trimwhitespace always
--wraparguments after-first
--wraparguments preserve
--wrapcollections preserve


# rules

--enable isEmpty
--disable wrapMultilineStatementBraces
3 changes: 3 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
brew 'xcodes'
brew 'xcbeautify'
brew 'aria2'
Loading

0 comments on commit 0f26d02

Please sign in to comment.