Skip to content

Maintaining

Paul Zabelin edited this page Jan 20, 2019 · 23 revisions

Maintaining the project

Kanban

Use Kanban project to track pending work:

Architecture

  1. Code coverage is maintained at 100%, see codecov.io report.
  2. Single workspace builds Example app and the development pod as a dependency.
  3. Cocoapods are not checked, see benefits ignoring Pods
  4. Travis runs fast parallelizing multiple jobs on several iOS simulators and Mac OS using build cache.
  5. Travis deploys tagged release and verifies pod lib lint.
  6. Carthage compatible, release is made by Carthage archive.
  7. Cocoapods and Bundle dependencies maintained up-to-date monthly by Cron Job.

Xcode Workspace

  1. Install dependencies
cd Example
pod install
  1. Open workspace open Example/PerspectiveTransform.xcworkspace
  2. Autofix Xcode warnings by updating the Pods project to recommended settings and migrating to Swift 4.2. Verify that does not produce code changes

Framework scheme

Build the PerspectiveTransform pod and run unit specs.

Example scheme

  1. Run should open the app with two tabs:
    1. Drag text field corners, it should allow text editing
    2. Tap to see the animation snapping sky in the frame of iPad.
  2. The test Cmd-U should run both Framework Unit Specs and App Specs

Open CV Tests scheme

OpenCV OSX Tests target should pass tests on Mac OS

Visual.playground

Verify all pages work with Live View open in the assistant editor window.

Travis build

Multiple Environments

  1. iPhone X to report coverage and deploy releases
  2. Mac OS to run tests and compare with OpenCV implementation. Also runs pod lib lint
  3. Other iOS simulators to run tests in parallel

pod lib lint should pass without warnings. When it fails Travis will rerun it with verbose output and will keep the generated workspace for inspection, see lint retry with verbose

Travis runs build monthly via Cron Job and fails if dependencies are outdated.

Build time optimizations

  1. git shallow clone
  2. cache cocoapods, bundler, brew
  3. pod repo update is done by git pull only once
  4. link cached brew package instead of installing

Debug Travis Failures

  • Delete build cache after updating Podfile
  • Debug Travis job using curl command and ssh to the build machine using tmux session

Create a temporary branch fix-travis

Prepare environment, copy Xcode destination from Travis log

export TRAVIS_XCODE_WORKSPACE=Example/PerspectiveTransform.xcworkspace
export TRAVIS_XCODE_SCHEME=Example
export XCODE_DESNITATION='platform=iOS Simulator,name=iPhone 8' 

Run locally the same script command without xcpretty:

xcodebuild test -workspace "$TRAVIS_XCODE_WORKSPACE" -scheme "$TRAVIS_XCODE_SCHEME" -destination "$XCODE_DESNITATION"

Clone this wiki locally