language: objective-c osx_image: xcode11 branches: only: - master env: global: - LC_CTYPE=en_US.UTF-8 - LANG=en_US.UTF-8 before_install: - env - locale - gem install cocoapods --prerelease --no-document --quiet - gem install xcpretty --no-document --quiet - pod --version - xcpretty --version - xcodebuild -version - xcodebuild -showsdks script: - set -o pipefail - echo "Check external deployment platforms" - echo "Check CocoaPods CocoaLumberjack.podspec" - pod lib lint - echo "Check Swift Package manager Package.swift" - swift test - echo "Build as static library" - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-Static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack-Static' -sdk macosx -configuration Release | xcpretty -c - echo "Build as dynamic framework (ObjectiveC), each platform (iOS, macOS, tvOS, watchOS)" - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -configuration Release -sdk macosx | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjack' -configuration Release -sdk watchsimulator | xcpretty -c - echo "Build as dynamic framework (Swift), each platform (iOS, macOS, tvOS, watchOS)" - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -configuration Release -sdk macosx | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c - xcodebuild clean build -workspace Xcode/Lumberjack.xcworkspace -scheme 'CocoaLumberjackSwift' -configuration Release -sdk watchsimulator | xcpretty -c - echo "Build test app using the static library" - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'iOSStaticLibraryIntegration' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c - echo "Build test apps using the dynamic framework, each platform (iOS, macOS, tvOS, watchOS)" - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'macOSSwiftIntegration' -configuration Release -sdk macosx | xcpretty -c - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'iOSFrameworkIntegration' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Release | xcpretty -c - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'tvOSSwiftIntegration' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Release -sdk appletvsimulator | xcpretty -c - xcodebuild clean build -project Integration/Integration.xcodeproj -scheme 'watchOSSwiftIntegration' -configuration Release -sdk watchsimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' | xcpretty -c - echo "Run the tests" - 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 - 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 - echo "Building the Demos" - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'BenchmarkIPhone' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'BenchmarkMac' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CLI' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CaptureASL' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'ContextFilter' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CoreDataLogger' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CustomFormatters' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'CustomLogLevels' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'DispatchQueueLogger' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'FineGrainedLogging' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'GlobalLogLevel' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'LogFileCompressor' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'NonArcTest' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'OverflowTestMac' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'PerUserLogLevels' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'RegisteredLoggingTest (Desktop)' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'RegisteredLoggingTest (Mobile)' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'RollingTestMac' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'SQLiteLogger' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'TestXcodeColors (Desktop)' | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'TextXcodeColors (Mobile)' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'UniversalApp' -configuration Release -sdk iphonesimulator | xcpretty -c - xcodebuild clean build -workspace Demos/Demos.xcworkspace -scheme 'WebServerIPhone' -configuration Release -sdk iphonesimulator | xcpretty -c - bundle exec danger after_success: - bash <(curl -s https://codecov.io/bash)