.travis.yml 6.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. language: objective-c
  2. osx_image: xcode11
  3. branches:
  4. only:
  5. - master
  6. env:
  7. global:
  8. - LC_CTYPE=en_US.UTF-8
  9. - LANG=en_US.UTF-8
  10. before_install:
  11. - env
  12. - locale
  13. - gem install cocoapods --prerelease --no-document --quiet
  14. - gem install xcpretty --no-document --quiet
  15. - pod --version
  16. - xcpretty --version
  17. - xcodebuild -version
  18. - xcodebuild -showsdks
  19. script:
  20. - set -o pipefail
  21. - echo "Check external deployment platforms"
  22. - echo "Check CocoaPods CocoaLumberjack.podspec"
  23. - pod lib lint
  24. - echo "Check Swift Package manager Package.swift"
  25. - swift test
  26. - echo "Build as static library"
  27. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-Static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c
  28. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-Static' -sdk macosx -configuration Release | xcpretty -c
  29. - echo "Build as dynamic framework (ObjectiveC), each platform (iOS, macOS, tvOS, watchOS)"
  30. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -configuration Release -sdk iphonesimulator | xcpretty -c
  31. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -configuration Release -sdk macosx | xcpretty -c
  32. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c
  33. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -configuration Release -sdk watchsimulator | xcpretty -c
  34. - echo "Build as dynamic framework (Swift), each platform (iOS, macOS, tvOS, watchOS)"
  35. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -configuration Release -sdk iphonesimulator | xcpretty -c
  36. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -configuration Release -sdk macosx | xcpretty -c
  37. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c
  38. - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -configuration Release -sdk watchsimulator | xcpretty -c
  39. - echo "Build test app using the static library"
  40. - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'iOSStaticLibraryIntegration' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c
  41. - echo "Build test apps using the dynamic framework, each platform (iOS, macOS, tvOS, watchOS)"
  42. - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'macOSSwiftIntegration' -configuration Release -sdk macosx | xcpretty -c
  43. - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'iOSFrameworkIntegration' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c
  44. - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'tvOSSwiftIntegration' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c
  45. - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'watchOSSwiftIntegration' -configuration Release -sdk watchsimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' | xcpretty -c
  46. - echo "Run the tests"
  47. - xcodebuild test -skip-testing:'iOS Tests/DDFileLoggerPerformanceTests' -project Tests/Tests.xcodeproj -scheme 'iOS Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro,OS=latest' GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
  48. - xcodebuild test -skip-testing:'OS X Tests/DDFileLoggerPerformanceTests' -project Tests/Tests.xcodeproj -scheme 'OS X Tests' -sdk macosx GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
  49. - echo "Building the Demos"
  50. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'BenchmarkIPhone' -configuration Release -sdk iphonesimulator | xcpretty -c
  51. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'BenchmarkMac' | xcpretty -c
  52. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CLI' | xcpretty -c
  53. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CaptureASL' -configuration Release -sdk iphonesimulator | xcpretty -c
  54. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'ContextFilter' | xcpretty -c
  55. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CoreDataLogger' | xcpretty -c
  56. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CustomFormatters' | xcpretty -c
  57. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CustomLogLevels' | xcpretty -c
  58. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'DispatchQueueLogger' | xcpretty -c
  59. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'FineGrainedLogging' | xcpretty -c
  60. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'GlobalLogLevel' | xcpretty -c
  61. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'LogFileCompressor' | xcpretty -c
  62. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'NonArcTest' | xcpretty -c
  63. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'OverflowTestMac' | xcpretty -c
  64. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'PerUserLogLevels' | xcpretty -c
  65. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'RegisteredLoggingTest (Desktop)' | xcpretty -c
  66. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'RegisteredLoggingTest (Mobile)' -configuration Release -sdk iphonesimulator | xcpretty -c
  67. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'RollingTestMac' | xcpretty -c
  68. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'SQLiteLogger' | xcpretty -c
  69. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'TestXcodeColors (Desktop)' | xcpretty -c
  70. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'TextXcodeColors (Mobile)' -configuration Release -sdk iphonesimulator | xcpretty -c
  71. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'UniversalApp' -configuration Release -sdk iphonesimulator | xcpretty -c
  72. - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'WebServerIPhone' -configuration Release -sdk iphonesimulator | xcpretty -c
  73. - bundle exec danger
  74. after_success:
  75. - bash <(curl -s https://codecov.io/bash)