storage.yml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. language: [Swift, ObjC]
  23. include:
  24. - os: macos-13
  25. xcode: Xcode_15.2
  26. env:
  27. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  28. runs-on: ${{ matrix.os }}
  29. steps:
  30. - uses: actions/checkout@v4
  31. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  32. with:
  33. cache_key: integration${{ matrix.os }}
  34. - uses: ruby/setup-ruby@v1
  35. - name: Setup Bundler
  36. run: scripts/setup_bundler.sh
  37. - name: Install xcpretty
  38. run: gem install xcpretty
  39. - name: Install Secret GoogleService-Info.plist
  40. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  41. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  42. - name: Install Credentials.h
  43. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  44. FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
  45. - name: Install Credentials.swift
  46. run: |
  47. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  48. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  49. - name: Xcode
  50. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  51. - uses: nick-fields/retry@v3
  52. with:
  53. timeout_minutes: 120
  54. max_attempts: 3
  55. retry_on: error
  56. retry_wait_seconds: 120
  57. command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all)
  58. spm:
  59. # Don't run on private repo unless it is a PR.
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. strategy:
  62. matrix:
  63. include:
  64. - os: macos-12
  65. xcode: Xcode_14.2
  66. - os: macos-13
  67. xcode: Xcode_15.2
  68. runs-on: ${{ matrix.os }}
  69. steps:
  70. - uses: actions/checkout@v4
  71. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  72. with:
  73. cache_key: ${{ matrix.os }}
  74. - name: Xcode
  75. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  76. - name: Initialize xcodebuild
  77. run: scripts/setup_spm_tests.sh
  78. - name: Swift Unit Tests
  79. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit iOS spm
  80. spm-cron:
  81. # Don't run on private repo.
  82. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  83. strategy:
  84. matrix:
  85. target: [tvOS, macOS, catalyst, watchOS]
  86. os: [macos-12, macos-13]
  87. include:
  88. - os: macos-12
  89. xcode: Xcode_14.2
  90. - os: macos-13
  91. xcode: Xcode_15.2
  92. runs-on: ${{ matrix.os }}
  93. steps:
  94. - uses: actions/checkout@v4
  95. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  96. with:
  97. cache_key: spm-cron${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  98. - name: Xcodes
  99. run: ls -l /Applications/Xcode*
  100. - name: Xcode
  101. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  102. - name: Initialize xcodebuild
  103. run: scripts/setup_spm_tests.sh
  104. - name: Unit Tests
  105. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm
  106. quickstart:
  107. # Don't run on private repo unless it is a PR.
  108. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  109. # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed.
  110. strategy:
  111. matrix:
  112. include:
  113. - os: macos-12
  114. xcode: Xcode_14.2
  115. - swift: swift
  116. os: macos-13
  117. xcode: Xcode_15.2
  118. - swift: swift
  119. os: macos-13
  120. xcode: Xcode_15.2
  121. env:
  122. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  123. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  124. LEGACY: true
  125. runs-on: ${{ matrix.os }}
  126. steps:
  127. - uses: actions/checkout@v4
  128. - uses: ruby/setup-ruby@v1
  129. - name: Setup quickstart
  130. run: scripts/setup_quickstart.sh storage
  131. - name: Install Secret GoogleService-Info.plist
  132. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  133. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  134. - name: Xcode
  135. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  136. - name: Test quickstart
  137. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true ${{ matrix.swift }})
  138. quickstart-ftl-cron-only:
  139. # Don't run on private repo.
  140. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  141. env:
  142. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  143. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  144. LEGACY: true
  145. runs-on: macos-12
  146. steps:
  147. - uses: actions/checkout@v4
  148. - uses: ruby/setup-ruby@v1
  149. - uses: actions/setup-python@v4
  150. with:
  151. python-version: '3.11'
  152. - name: Setup quickstart
  153. run: scripts/setup_quickstart.sh storage
  154. - name: Install Secret GoogleService-Info.plist
  155. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  156. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  157. # - name: Build objc quickstart
  158. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage)
  159. - name: Build swift quickstart
  160. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift)
  161. - id: ftl_test
  162. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  163. with:
  164. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  165. testapp_dir: quickstart-ios/build-for-testing
  166. test_type: "xctest"
  167. pod-lib-lint:
  168. # Don't run on private repo unless it is a PR.
  169. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  170. strategy:
  171. matrix:
  172. target: [ios, tvos, macos, watchos]
  173. os: [macos-12, macos-13]
  174. include:
  175. - os: macos-12
  176. xcode: Xcode_14.2
  177. tests: --skip-tests
  178. - os: macos-13
  179. xcode: Xcode_15.2
  180. tests: --test-specs=unit
  181. runs-on: ${{ matrix.os }}
  182. steps:
  183. - uses: actions/checkout@v4
  184. - uses: ruby/setup-ruby@v1
  185. - name: Setup Bundler
  186. run: scripts/setup_bundler.sh
  187. - name: Xcodes
  188. run: ls -l /Applications/Xcode*
  189. - name: Xcode
  190. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  191. - name: Build and test
  192. run: |
  193. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.tests }} \
  194. --platforms=${{ matrix.target }}
  195. storage-cron-only:
  196. # Don't run on private repo.
  197. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  198. strategy:
  199. matrix:
  200. target: [ios, tvos, macos, watchos]
  201. os: [macos-12, macos-13]
  202. include:
  203. - os: macos-12
  204. xcode: Xcode_14.2
  205. - os: macos-13
  206. xcode: Xcode_15.2
  207. runs-on: ${{ matrix.os }}
  208. needs: pod-lib-lint
  209. steps:
  210. - uses: actions/checkout@v4
  211. - uses: ruby/setup-ruby@v1
  212. - name: Setup Bundler
  213. run: scripts/setup_bundler.sh
  214. - name: Xcode
  215. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  216. - name: PodLibLint Storage Cron
  217. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests