Thoughts about build flow

Ca8210ff0ece2bb6f9fff5fd0770ea64?s=47 Muukii
March 28, 2019

Thoughts about build flow

Ca8210ff0ece2bb6f9fff5fd0770ea64?s=128

Muukii

March 28, 2019
Tweet

Transcript

  1. build eureka.swift ✗ Bitrise Muukii | Eureka, Inc 2019 March

    Thoughts about build flow
  2. Hiroshi Kimura Muukii Twitter @muukii0803 iOS Engineer Head of Development,

    Pairs Global
  3. None
  4. 1BJSTʹ͍ͭͯ !4

  5. 4PVUI,PSFB Japan Taiwan No.1 2017 release No.1 !5 1BJSTʹ͍ͭͯ ల։ࠃ

    ̐ͭͷϓϥοτϑΥʔϜ CONFIDENTIAL INFORMATION: Not for Public Distribution - Do Not Copy
  6. ! " # eure/pairs-ios eure/pairs-gl-ios I’m here $

  7. None
  8. • Summary • Current build flow of Pairs Global •

    We are moving our build flow to the cloud Contents
  9. Summary

  10. • Building on cloud CI/CD took a very long time

    until now • But now • Swift compiler is faster (4.2 batch mode) • We can build large applications on cloud CI/CD Summary
  11. Current build flow of Pairs Global

  12. 1. Run UnitTests 2. Archive 3. Upload to AppStoreConnect 4.

    Create git-tag using timestamp 5. Upload artifact to git-tag on GitHub Flow
  13. • UnitTest • Logic • Benchmark • UITest • Login

    flow Run Tests
  14. • Beta • For Testing (Internal / External) • Release

    • For Release and for Testing (Internal / External) Archive
  15. • We can install beta / release apps with TestFlight

    • Using Internal / External Testers Upload to AppStoreConnect
  16. Release Beta

  17. • After successful upload to AppStoreConnect • Create a tag

    with environment and timestamp • v50.4.0-appstore.53240316.1 • v50.4.0-beta.52968482.0 Create git-tag using timestamp
  18. • .xcarchive • .app for iOS Simulator Upload artifacts to

    GitHub
  19. None
  20. App for simulator. You can drag and drop to its

    home screen.
  21. None
  22. Sample code to create app for simulator

  23. We are trying to use Bitrise

  24. • We created a large application • Over 140000 lines

    Swift Code • CI/CD took over 1 hour to archive or time out • Building the code of CocoaPods • Building the code of Application With Swift2.x
  25. So, we got…

  26. None
  27. None
  28. • Jenkins is an open source automation server written in

    Java • Powerful & Flexible Jenkins
  29. • Setting up is too hard for us * •

    Does not have cool UI Design * • https://ci.swift.org/ is better. But,
  30. I just need to run git polling and shell-script.

  31. • https://github.com/eure/Tower • Watch branch with polling • Run shell-script,

    if Tower finds new commits on a branch • That’s it. But actually just what I needed. eure/Tower instead of Jenkins
  32. • Creating Server Software has some difficult points. • Manage

    child-process • Zero memory leaks • To keep working as long as possible But,
  33. None
  34. Jenkins Blue Ocean

  35. • Multi-branch Pipeline • Blue Ocean is a plugin •

    Jenkins + Blue Ocean = Better UI Design (Better) Jenkins + Blue Ocean
  36. None
  37. None
  38. • Around 15min (fastlane build_app) • Then, upload to AppStoreConnect

    Archive Time on Mac Pro
  39. None
  40. • Management cost of Jenkins is high • With Bitrise,

    we can see the status of tasks from online We are trying to use Bitrise
  41. • Around 25min (fastlane build_app) Archive Time on Bitrise

  42. • Longer archive time, but it’s no big deal •

    Incredibly fast compared to few years ago Awesome
  43. • Carthage creates prebuilt frameworks. • No need to build

    them for archive • Most of archiving time is building frameworks managed by CocoaPods in our project • Recently, we came back to CocoaPods We can reduce it with Carthage
  44. • LLDB does not work well with Carthage. • "error:

    Couldn't IRGen expression, no additional error" • To create an umbrella framework that includes many static frameworks • App launch time will be faster by reducing dynamic linking. Why we use CocoaPods
  45. • Easier to debug inside libraries. • We can notice

    debug logs from libraries. Why we use CocoaPods
  46. Every tool is improving day by day We will never

    stop finding a better way
  47. Thank you! build eureka.swift ✗ Bitrise Hiroshi Kimura | Eureka,

    Inc. 2019 March