.travis.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. branches:
  2. only:
  3. - master
  4. language: objective-c
  5. os: osx
  6. osx_image: xcode7.3
  7. env:
  8. matrix:
  9. - TEST_TYPE=iOS
  10. - TEST_TYPE=OSX
  11. - TEST_TYPE=tvOS
  12. - TEST_TYPE=CocoaPods
  13. - TEST_TYPE=Carthage
  14. before_install:
  15. - |
  16. if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ] || [ "$TEST_TYPE" = tvOS ]; then
  17. bundle install
  18. elif [ "$TEST_TYPE" = Carthage ]; then
  19. brew update
  20. brew install carthage || brew upgrade carthage
  21. fi
  22. install:
  23. - |
  24. if [ "$TEST_TYPE" = iOS ]; then
  25. ./TestSupport/setup_env.sh .env
  26. fi
  27. script:
  28. - |
  29. if [ "$TEST_TYPE" = iOS ]; then
  30. set -o pipefail
  31. xcodebuild -project SocketRocket.xcodeproj -scheme "SocketRocket-iOS" -sdk iphonesimulator build test
  32. elif [ "$TEST_TYPE" = OSX ]; then
  33. set -o pipefail
  34. xcodebuild -project SocketRocket.xcodeproj -scheme "SocketRocket-macOS" -sdk macosx build | xcpretty -c
  35. elif [ "$TEST_TYPE" = tvOS ]; then
  36. set -o pipefail
  37. xcodebuild -project SocketRocket.xcodeproj -scheme "SocketRocket-tvOS" -sdk appletvsimulator build | xcpretty -c
  38. elif [ "$TEST_TYPE" = CocoaPods ]; then
  39. pod lib lint SocketRocket.podspec
  40. pod lib lint --use-libraries SocketRocket.podspec
  41. elif [ "$TEST_TYPE" = Carthage ]; then
  42. carthage build --no-skip-current
  43. fi