.travis.yml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. language: objective-c
  2. osx_image: xcode9.3
  3. env:
  4. global:
  5. - LC_CTYPE=en_US.UTF-8
  6. - LANG=en_US.UTF-8
  7. before_install:
  8. - env
  9. - locale
  10. - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
  11. - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
  12. - pod --version
  13. - pod setup --silent > /dev/null
  14. - pod repo update --silent
  15. - xcpretty --version
  16. - xcodebuild -version
  17. - xcodebuild -showsdks
  18. script:
  19. - set -o pipefail
  20. - echo Check if the library described by the podspec can be built
  21. - pod lib lint --swift-version=4.0
  22. - echo Build as static library
  23. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-iOS-Static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c
  24. - echo Build test app using the static library
  25. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'iOSLibStaticTest' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c
  26. - echo "Build as dynamic framework (ObjectiveC), each platform (iOS, macOS, tvOS, watchOS)"
  27. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-iOS' -configuration Release -sdk iphonesimulator | xcpretty -c
  28. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-macOS' -configuration Release -sdk macosx | xcpretty -c
  29. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-tvOS' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c
  30. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-watchOS' -configuration Release -sdk watchsimulator | xcpretty -c
  31. - echo "Build as dynamic framework (Swift), each platform (iOS, macOS, tvOS, watchOS)"
  32. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift-iOS' -configuration Release -sdk iphonesimulator | xcpretty -c
  33. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift-macOS' -configuration Release -sdk macosx | xcpretty -c
  34. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift-tvOS' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c
  35. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift-watchOS' -configuration Release -sdk watchsimulator | xcpretty -c
  36. - echo "Build test apps using the dynamic framework, each platform (iOS, macOS, tvOS, watchOS)"
  37. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'SwiftTest' -configuration Release -sdk macosx | xcpretty -c
  38. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'FmwkTest' -configuration Release -sdk macosx | xcpretty -c
  39. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'tvOSSwiftTest' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c
  40. - xcodebuild clean build -workspace Framework/Lumberjack.xcworkspace -scheme 'watchOSSwiftTest' -configuration Release -sdk watchsimulator | xcpretty -c
  41. - echo Run the tests
  42. - pod install --project-directory=Tests
  43. - xcodebuild test -workspace Framework/Lumberjack.xcworkspace -scheme 'iOS Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=latest' GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
  44. - xcodebuild test -workspace Framework/Lumberjack.xcworkspace -scheme 'OS X Tests' -sdk macosx GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
  45. - echo Building the Demos
  46. - cd Demos
  47. - pod install --project-directory=ContextFilter
  48. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'ContextFilter' | xcpretty -c
  49. - pod install --project-directory=CoreDataLogger
  50. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'CoreDataLogger' | xcpretty -c
  51. - pod install --project-directory=CustomFormatters
  52. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'CustomFormatters' | xcpretty -c
  53. - pod install --project-directory=CustomLogLevels
  54. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'CustomLogLevels' | xcpretty -c
  55. - pod install --project-directory=DispatchQueueLogger
  56. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'DispatchQueueLogger' | xcpretty -c
  57. - pod install --project-directory=FineGrainedLogging
  58. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'FineGrainedLogging' | xcpretty -c
  59. - pod install --project-directory=GlobalLogLevel
  60. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'GlobalLogLevel' | xcpretty -c
  61. - pod install --project-directory=LogFileCompressor
  62. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'LogFileCompressor' | xcpretty -c
  63. - pod install --project-directory=NonArcTest
  64. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'NonArcTest' | xcpretty -c
  65. - pod install --project-directory=OverflowTestMac
  66. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'OverflowTestMac' | xcpretty -c
  67. - pod install --project-directory=PerUserLogLevels
  68. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'PerUserLogLevels' | xcpretty -c
  69. - pod install --project-directory=RegisteredDynamicLogging/Mobile
  70. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'RegisteredLoggingTest (Mobile)' -configuration Release -sdk iphonesimulator | xcpretty -c
  71. - pod install --project-directory=RegisteredDynamicLogging/Desktop
  72. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'RegisteredLoggingTest (Desktop)' | xcpretty -c
  73. - pod install --project-directory=RollingTestMac
  74. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'RollingTestMac' | xcpretty -c
  75. - pod install --project-directory=TestXcodeColors/Desktop
  76. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'TestXcodeColors (Desktop)' | xcpretty -c
  77. - pod install --project-directory=TestXcodeColors/Mobile
  78. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'TextXcodeColors (Mobile)' -configuration Release -sdk iphonesimulator | xcpretty -c
  79. - pod install --project-directory=WebServerIPhone
  80. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'WebServerIPhone' -configuration Release -sdk iphonesimulator | xcpretty -c
  81. - pod install --project-directory=Benchmark/Desktop
  82. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'BenchmarkMac' | xcpretty -c
  83. - pod install --project-directory=Benchmark/Mobile
  84. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'BenchmarkIPhone' -configuration Release -sdk iphonesimulator | xcpretty -c
  85. - pod install --project-directory=SQLiteLogger
  86. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'SQLiteLogger' | xcpretty -c
  87. - pod install --project-directory=UniversalApp
  88. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'UniversalApp' -configuration Release -sdk iphonesimulator | xcpretty -c
  89. - pod install --project-directory=CLI
  90. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'CLI' | xcpretty -c
  91. - pod install --project-directory=CaptureASL
  92. - xcodebuild clean build -workspace Demos.xcworkspace -scheme 'CaptureASL' -configuration Release -sdk iphonesimulator | xcpretty -c
  93. after_success:
  94. - bash <(curl -s https://codecov.io/bash)