| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- os: osx
- osx_image: xcode10.1
- language: objective-c
- cache:
- - bundler
- - cocoapods
- jobs:
- include:
- - stage: checks
- # This only needs to be run once, so restrict it to an arbitrary combination
- before_install:
- - brew install clang-format
- - brew install swiftformat
- script:
- - ./scripts/check_whitespace.sh
- - ./scripts/check_copyright.sh
- - ./scripts/check_no_module_imports.sh
- - ./scripts/check_test_inclusion.py
- - ./scripts/style.sh test-only $TRAVIS_COMMIT_RANGE
- # Google C++ style compliance
- - ./scripts/lint.sh $TRAVIS_COMMIT_RANGE
- # The order of builds matters (even though they are run in parallel):
- # Travis will schedule them in the same order they are listed here.
- # Primary platforms
- # Run unit tests
- - stage: test
- env:
- - PROJECT=Firebase PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
- - stage: test
- env:
- - PROJECT=InAppMessagingDisplay PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- # pod lib lint to check build and warnings for dynamic framework build (use_frameworks!)
- - stage: test
- env:
- - PROJECT=Firebase PLATFORM=iOS METHOD=pod-lib-lint
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleUtilities.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseCore.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAnalyticsInterop.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuth.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuthInterop.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDatabase.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDynamicLinks.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseMessaging.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseStorage.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessaging.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessagingDisplay.podspec
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=pod-lib-lint
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- # Eliminate the one warning from BoringSSL when CocoaPods 1.6.0 is available.
- # The travis_wait is necessary because the command takes more than 10 minutes.
- - travis_wait 45 ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFirestore.podspec --allow-warnings --no-subspecs
- # pod lib lint to check build and warnings for static library build - only on cron jobs
- - stage: test
- env:
- - PROJECT=Firebase PLATFORM=iOS METHOD=pod-lib-lint
- before_install:
- - ./scripts/if_cron.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh GoogleUtilities.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseCore.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseAnalyticsInterop.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseAuth.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseAuthInterop.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseDatabase.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseDynamicLinks.podspec --use-libraries
- # The Protobuf dependency of FirebaseMessaging has warnings with --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseMessaging.podspec --use-libraries --allow-warnings
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseStorage.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessaging.podspec --use-libraries
- - travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessagingDisplay.podspec --use-libraries
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=pod-lib-lint
- before_install:
- - ./scripts/if_cron.sh ./scripts/install_prereqs.sh
- script:
- # TBD - non-portable path warnings
- # The travis_wait is necessary because the command takes more than 10 minutes.
- - travis_wait 45 ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseFirestore.podspec --use-libraries --allow-warnings --no-subspecs
- # Daily test for symbol collisions between Firebase and CocoaPods.
- - stage: test
- env:
- - PROJECT=SymbolCollision PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_cron.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_cron.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- # Alternative platforms
- # Xcode 9
- - stage: test
- osx_image: xcode9.4
- env:
- - PROJECT=Firebase PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - npm install ios-sim -g
- - ios-sim start --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus, 11.3"
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
- - stage: test
- osx_image: xcode9.4
- env:
- - PROJECT=InAppMessagingDisplay PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
- - stage: test
- osx_image: xcode9.4
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=macOS METHOD=cmake
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- - stage: test
- osx_image: xcode8.3
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild XCODE_VERSION=8.3.3
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- # Xcode 9 may find lint errors that don't show up in Xcode 10 (#2081)
- - stage: test
- osx_image: xcode9.4
- env:
- - PROJECT=Firebase PLATFORM=iOS METHOD=pod-lib-lint
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleUtilities.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseCore.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAnalyticsInterop.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuth.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuthInterop.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDatabase.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDynamicLinks.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseMessaging.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseStorage.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessaging.podspec
- - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessagingDisplay.podspec
- - stage: test
- osx_image: xcode9.4
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=pod-lib-lint
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- # Eliminate the one warning from BoringSSL when CocoaPods 1.6.0 is available.
- # The travis_wait is necessary because the command takes more than 10 minutes.
- - travis_wait 45 ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFirestore.podspec --allow-warnings --no-subspecs
- # Community-supported platforms
- - stage: test
- env:
- - PROJECT=Firebase PLATFORM=macOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
- - stage: test
- env:
- - PROJECT=Firebase PLATFORM=tvOS METHOD=xcodebuild
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
- # Firestore sanitizers
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild SANITIZERS=asan
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild SANITIZERS=tsan
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- # TODO(varconst): enable UBSan in xcodebuild. Right now if fails during
- # linkage (it works if enabled together with ASan, but it's supposed to be
- # usable on its own, too).
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=macOS METHOD=cmake SANITIZERS=asan
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=macOS METHOD=cmake SANITIZERS=tsan
- before_install:
- - ./scripts/if_changed.sh ./scripts/install_prereqs.sh
- script:
- - travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
- allow_failures:
- # Run fuzz tests only on cron jobs.
- - stage: test
- env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=fuzz
- before_install:
- - ./scripts/if_cron.sh ./scripts/install_prereqs.sh
- script:
- # The travis_wait is necessary because fuzzing runs for 40 minutes.
- - travis_wait 45 ./scripts/if_cron.sh ./scripts/fuzzing_ci.sh
- # TODO(varconst): UBSan for CMake. UBSan failures are non-fatal by default,
- # need to make them fatal for the purposes of the test run.
- # TODO(varconst): disallow sanitizers to fail once we fix all existing issues.
- - env:
- - PROJECT=Firestore PLATFORM=macOS METHOD=cmake SANITIZERS=asan
- - env:
- - PROJECT=Firestore PLATFORM=macOS METHOD=cmake SANITIZERS=tsan
- - env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild SANITIZERS=asan
- - env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild SANITIZERS=tsan
- # TODO(varconst): enable if it's possible to make this flag work on build
- # stages. It's supposed to avoid waiting for jobs that are allowed to fail
- # before reporting the results.
- # fast_finish: true
- branches:
- only:
- - master
|