storage.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. name: storage
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseStorage**'
  6. - 'Interop/Auth/Public/*.h'
  7. - '.github/workflows/storage.yml'
  8. - 'scripts/**'
  9. # Rebuild on Ruby infrastructure changes.
  10. - 'Gemfile'
  11. schedule:
  12. # Run every day at 11pm (PST) - cron uses UTC times
  13. - cron: '0 7 * * *'
  14. jobs:
  15. storage:
  16. # Don't run on private repo unless it is a PR.
  17. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  18. env:
  19. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  20. runs-on: macos-latest
  21. strategy:
  22. matrix:
  23. pod: [Storage, StorageSwift]
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: Install Secret GoogleService-Info.plist
  29. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  30. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  31. - name: Install Credentials.h
  32. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  33. FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
  34. - name: Install Credentials.swift
  35. run: |
  36. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  37. FirebaseStorage/Tests/SwiftIntegration/Credentials.swift "$plist_secret"
  38. cp FirebaseStorage/Tests/SwiftIntegration/Credentials.swift FirebaseStorageSwift/Tests/Integration/
  39. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  40. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh ${{ matrix.pod }} all)
  41. spm:
  42. # Don't run on private repo unless it is a PR.
  43. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  44. runs-on: macOS-latest
  45. steps:
  46. - uses: actions/checkout@v2
  47. - name: Xcode 12
  48. run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
  49. - name: Initialize xcodebuild
  50. run: xcodebuild -list
  51. - name: iOS Unit Tests
  52. run: scripts/third_party/travis/retry.sh xcodebuild -scheme StorageUnit test -sdk
  53. iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' | xcpretty
  54. spm-cron:
  55. # Don't run on private repo.
  56. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  57. runs-on: macOS-latest
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Xcode 12
  61. run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
  62. - name: Initialize xcodebuild
  63. run: xcodebuild -list
  64. - name: macOS Unit Tests
  65. run: scripts/third_party/travis/retry.sh xcodebuild -scheme StorageUnit test | xcpretty
  66. - name: tvOS Unit Tests
  67. run: scripts/third_party/travis/retry.sh xcodebuild -scheme StorageUnit test -sdk
  68. appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
  69. catalyst:
  70. # Don't run on private repo unless it is a PR.
  71. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  72. runs-on: macOS-latest
  73. steps:
  74. - uses: actions/checkout@v2
  75. - name: Setup Bundler
  76. run: scripts/setup_bundler.sh
  77. - name: Setup project and Build for Catalyst
  78. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  79. run: scripts/test_catalyst.sh FirebaseStorage build FirebaseStorage-Unit-unit
  80. quickstart:
  81. # Don't run on private repo unless it is a PR.
  82. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  83. env:
  84. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  85. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  86. runs-on: macOS-latest
  87. steps:
  88. - uses: actions/checkout@v2
  89. - name: Setup quickstart
  90. run: scripts/setup_quickstart.sh storage
  91. - name: Install Secret GoogleService-Info.plist
  92. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  93. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  94. - name: Install Secret FIREGSignInInfo.h
  95. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  96. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  97. - name: Test objc quickstart
  98. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage)
  99. - name: Test swift quickstart
  100. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage swift)
  101. pod-lib-lint:
  102. # Don't run on private repo unless it is a PR.
  103. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  104. runs-on: macOS-latest
  105. strategy:
  106. matrix:
  107. # watchos is disabled since pod lib lint cannot handle test Auth dep even if the dep is only
  108. # specified for the other three platforms.
  109. target: [ios, tvos, macos]
  110. steps:
  111. - uses: actions/checkout@v2
  112. - name: Setup Bundler
  113. run: scripts/setup_bundler.sh
  114. - name: Build and test
  115. run: |
  116. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --skip-tests --platforms=${{ matrix.target }}
  117. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --skip-tests --platforms=${{ matrix.target }}
  118. storage-cron-only:
  119. # Don't run on private repo.
  120. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  121. runs-on: macos-latest
  122. strategy:
  123. matrix:
  124. target: [ios, tvos, macos]
  125. flags: [
  126. '--skip-tests --use-modular-headers',
  127. '--skip-tests --use-libraries'
  128. ]
  129. needs: pod-lib-lint
  130. steps:
  131. - uses: actions/checkout@v2
  132. - name: Setup Bundler
  133. run: scripts/setup_bundler.sh
  134. - name: PodLibLint Storage Cron
  135. run: |
  136. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  137. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}