storage.yml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. name: storage
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseStorage**'
  6. - 'FirebaseAuth/Interop/*.h'
  7. - '.github/workflows/storage.yml'
  8. # Rebuild on Ruby infrastructure changes.
  9. - 'Gemfile*'
  10. schedule:
  11. # Run every day at 12am (PST) - cron uses UTC times
  12. - cron: '0 8 * * *'
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. storage-integration-tests:
  18. # Don't run on private repo unless it is a PR.
  19. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  20. strategy:
  21. matrix:
  22. include:
  23. # TODO: investigate integration test extreme flakiness on Xcode 15
  24. - os: macos-12
  25. xcode: Xcode_14.2
  26. # - os: macos-13
  27. # xcode: Xcode_15.0.1
  28. env:
  29. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  30. runs-on: ${{ matrix.os }}
  31. steps:
  32. - uses: actions/checkout@v3
  33. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  34. with:
  35. cache_key: ${{ matrix.os }}
  36. - uses: ruby/setup-ruby@v1
  37. - name: Setup Bundler
  38. run: scripts/setup_bundler.sh
  39. - name: Install xcpretty
  40. run: gem install xcpretty
  41. - name: Install Secret GoogleService-Info.plist
  42. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  43. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  44. - name: Install Credentials.h
  45. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  46. FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
  47. - name: Install Credentials.swift
  48. run: |
  49. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  50. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  51. - name: Xcode
  52. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  53. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  54. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Storage all)
  55. spm:
  56. # Don't run on private repo unless it is a PR.
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. strategy:
  59. matrix:
  60. include:
  61. - os: macos-12
  62. xcode: Xcode_14.2
  63. - os: macos-13
  64. xcode: Xcode_15.0.1
  65. runs-on: ${{ matrix.os }}
  66. steps:
  67. - uses: actions/checkout@v3
  68. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  69. with:
  70. cache_key: ${{ matrix.os }}
  71. - name: Xcode
  72. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  73. - name: Initialize xcodebuild
  74. run: scripts/setup_spm_tests.sh
  75. - name: Swift Unit Tests
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit iOS spm
  77. spm-cron:
  78. # Don't run on private repo.
  79. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  80. strategy:
  81. matrix:
  82. target: [tvOS, macOS, catalyst, watchOS]
  83. os: [macos-12, macos-13]
  84. include:
  85. - os: macos-12
  86. xcode: Xcode_14.2
  87. - os: macos-13
  88. xcode: Xcode_15.0.1
  89. runs-on: ${{ matrix.os }}
  90. steps:
  91. - uses: actions/checkout@v3
  92. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  93. with:
  94. cache_key: ${{ matrix.os }}
  95. - name: Xcodes
  96. run: ls -l /Applications/Xcode*
  97. - name: Xcode
  98. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  99. - name: Initialize xcodebuild
  100. run: scripts/setup_spm_tests.sh
  101. - name: Unit Tests
  102. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm
  103. quickstart:
  104. # Don't run on private repo unless it is a PR.
  105. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  106. strategy:
  107. matrix:
  108. include:
  109. - os: macos-12
  110. xcode: Xcode_14.2
  111. - os: macos-13
  112. xcode: Xcode_15.0.1
  113. env:
  114. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  115. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  116. LEGACY: true
  117. runs-on: ${{ matrix.os }}
  118. steps:
  119. - uses: actions/checkout@v3
  120. - uses: ruby/setup-ruby@v1
  121. - name: Setup quickstart
  122. run: scripts/setup_quickstart.sh storage
  123. - name: Install Secret GoogleService-Info.plist
  124. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  125. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  126. - name: Xcode
  127. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  128. - name: Test objc quickstart
  129. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  130. - name: Test swift quickstart
  131. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  132. quickstart-ftl-cron-only:
  133. # Don't run on private repo.
  134. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  135. env:
  136. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  137. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  138. LEGACY: true
  139. runs-on: macos-12
  140. steps:
  141. - uses: actions/checkout@v3
  142. - uses: ruby/setup-ruby@v1
  143. - name: Setup quickstart
  144. run: scripts/setup_quickstart.sh storage
  145. - name: Install Secret GoogleService-Info.plist
  146. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  147. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  148. # - name: Build objc quickstart
  149. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage)
  150. - name: Build swift quickstart
  151. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift)
  152. - id: ftl_test
  153. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.2
  154. with:
  155. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  156. testapp_dir: quickstart-ios/build-for-testing
  157. test_type: "xctest"
  158. pod-lib-lint:
  159. # Don't run on private repo unless it is a PR.
  160. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  161. strategy:
  162. matrix:
  163. target: [ios, tvos, macos, watchos]
  164. os: [macos-12, macos-13]
  165. include:
  166. - os: macos-12
  167. xcode: Xcode_14.2
  168. - os: macos-13
  169. xcode: Xcode_15.0.1
  170. runs-on: ${{ matrix.os }}
  171. steps:
  172. - uses: actions/checkout@v3
  173. - uses: ruby/setup-ruby@v1
  174. - name: Setup Bundler
  175. run: scripts/setup_bundler.sh
  176. - name: Xcodes
  177. run: ls -l /Applications/Xcode*
  178. - name: Xcode
  179. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  180. - name: Build and test
  181. run: |
  182. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --test-specs=unit --platforms=${{ matrix.target }}
  183. storage-cron-only:
  184. # Don't run on private repo.
  185. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  186. strategy:
  187. matrix:
  188. target: [ios, tvos, macos, watchos]
  189. os: [macos-12, macos-13]
  190. include:
  191. - os: macos-12
  192. xcode: Xcode_14.2
  193. - os: macos-13
  194. xcode: xcode_15.0.1
  195. runs-on: ${{ matrix.os }}
  196. needs: pod-lib-lint
  197. steps:
  198. - uses: actions/checkout@v3
  199. - uses: ruby/setup-ruby@v1
  200. - name: Setup Bundler
  201. run: scripts/setup_bundler.sh
  202. - name: Xcode
  203. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  204. - name: PodLibLint Storage Cron
  205. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests