storage.yml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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 12am (PST) - cron uses UTC times
  13. - cron: '0 8 * * *'
  14. jobs:
  15. storage:
  16. # Don't run on private repo unless it is a PR.
  17. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  18. env:
  19. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  20. runs-on: macos-11
  21. strategy:
  22. matrix:
  23. pod: [Storage, StorageSwift]
  24. steps:
  25. - uses: actions/checkout@v2
  26. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  27. with:
  28. cache_key: ${{ matrix.os }}
  29. - name: Setup Bundler
  30. run: scripts/setup_bundler.sh
  31. - name: Install Secret GoogleService-Info.plist
  32. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  33. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  34. - name: Install Credentials.h
  35. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  36. FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
  37. - name: Install Credentials.swift
  38. run: |
  39. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  40. FirebaseStorage/Tests/SwiftIntegration/Credentials.swift "$plist_secret"
  41. cp FirebaseStorage/Tests/SwiftIntegration/Credentials.swift FirebaseStorageSwift/Tests/Integration/
  42. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  43. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh ${{ matrix.pod }} all)
  44. spm:
  45. # Don't run on private repo unless it is a PR.
  46. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  47. runs-on: macos-11
  48. steps:
  49. - uses: actions/checkout@v2
  50. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  51. with:
  52. cache_key: ${{ matrix.os }}
  53. - name: Initialize xcodebuild
  54. run: scripts/setup_spm_tests.sh
  55. - name: iOS Unit Tests
  56. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit iOS spm
  57. - name: Swift Build
  58. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageSwift-Beta iOS spmbuildonly
  59. spm-cron:
  60. # Don't run on private repo.
  61. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  62. runs-on: macos-11
  63. strategy:
  64. matrix:
  65. target: [tvOS, macOS, catalyst, watchOS]
  66. steps:
  67. - uses: actions/checkout@v2
  68. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  69. with:
  70. cache_key: ${{ matrix.os }}
  71. - name: Initialize xcodebuild
  72. run: scripts/setup_spm_tests.sh
  73. - name: Unit Tests
  74. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit ${{ matrix.target }} spm
  75. - name: Swift Build
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageSwift-Beta ${{ matrix.target }} spmbuildonly
  77. catalyst:
  78. # Don't run on private repo unless it is a PR.
  79. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  80. runs-on: macos-11
  81. steps:
  82. - uses: actions/checkout@v2
  83. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  84. with:
  85. cache_key: ${{ matrix.os }}
  86. - name: Setup Bundler
  87. run: scripts/setup_bundler.sh
  88. - name: Setup project and Build for Catalyst
  89. run: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit
  90. quickstart:
  91. # Don't run on private repo unless it is a PR.
  92. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  93. env:
  94. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  95. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  96. runs-on: macos-11
  97. steps:
  98. - uses: actions/checkout@v2
  99. - name: Setup quickstart
  100. run: scripts/setup_quickstart.sh storage
  101. - name: Install Secret GoogleService-Info.plist
  102. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  103. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  104. - name: Test objc quickstart
  105. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  106. - name: Test swift quickstart
  107. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  108. pod-lib-lint:
  109. # Don't run on private repo unless it is a PR.
  110. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  111. runs-on: macos-11
  112. strategy:
  113. matrix:
  114. target: [ios, tvos, macos, watchos]
  115. spec: [
  116. 'FirebaseStorage.podspec --test-specs=unit', # The integration tests need more set up.
  117. 'FirebaseStorageSwift.podspec --skip-tests' # No current unit tests.
  118. ]
  119. steps:
  120. - uses: actions/checkout@v2
  121. - name: Setup Bundler
  122. run: scripts/setup_bundler.sh
  123. - name: Build and test
  124. run: |
  125. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.spec }} --platforms=${{ matrix.target }}
  126. storage-cron-only:
  127. # Don't run on private repo.
  128. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  129. runs-on: macos-11
  130. strategy:
  131. matrix:
  132. target: [ios, tvos, macos, watchos]
  133. flags: [
  134. '--use-static-frameworks --skip-tests ',
  135. '--use-libraries --skip-tests '
  136. ]
  137. needs: pod-lib-lint
  138. steps:
  139. - uses: actions/checkout@v2
  140. - name: Setup Bundler
  141. run: scripts/setup_bundler.sh
  142. - name: PodLibLint Storage Cron
  143. run: |
  144. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  145. storageswift-cron-only:
  146. # Don't run on private repo.
  147. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  148. runs-on: macos-11
  149. strategy:
  150. matrix:
  151. target: [ios, tvos, macos, watchos]
  152. flags: [
  153. '--use-static-frameworks --skip-tests', # Swift pods do not support --use-libraries
  154. ]
  155. needs: pod-lib-lint
  156. steps:
  157. - uses: actions/checkout@v2
  158. - name: Setup Bundler
  159. run: scripts/setup_bundler.sh
  160. - name: PodLibLint Storage Cron
  161. run: |
  162. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  163. podspec-presubmit:
  164. # Don't run on private repo unless it is a PR.
  165. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  166. runs-on: macos-11
  167. strategy:
  168. matrix:
  169. spec: [
  170. 'FirebaseStorage.podspec --test-specs=unit', # The integration tests need more set up.
  171. 'FirebaseStorageSwift.podspec --skip-tests' # No current unit tests.
  172. ]
  173. steps:
  174. - uses: actions/checkout@v2
  175. - name: Setup Bundler
  176. run: scripts/setup_bundler.sh
  177. - name: Build and test
  178. run: scripts/third_party/travis/retry.sh pod spec lint ${{ matrix.spec }} --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'