storage.yml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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-14
  25. xcode: Xcode_15.3
  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. target: [iOS, tvOS, macOS, catalyst, watchOS]
  64. os: [macos-13, macos-14]
  65. include:
  66. - os: macos-13
  67. xcode: Xcode_15.2
  68. - os: macos-14
  69. xcode: Xcode_15.3
  70. - os: macos-14
  71. xcode: Xcode_15.3
  72. target: visionOS
  73. runs-on: ${{ matrix.os }}
  74. steps:
  75. - uses: actions/checkout@v4
  76. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  77. with:
  78. cache_key: spm-cron${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  79. - name: Xcodes
  80. run: ls -l /Applications/Xcode*
  81. - name: Xcode
  82. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  83. - name: Initialize xcodebuild
  84. run: scripts/setup_spm_tests.sh
  85. - name: Unit Tests
  86. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm
  87. quickstart:
  88. # Don't run on private repo unless it is a PR.
  89. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  90. # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed.
  91. strategy:
  92. matrix:
  93. include:
  94. #- os: macos-13
  95. # xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15.
  96. - swift: swift
  97. os: macos-14
  98. xcode: Xcode_15.3
  99. env:
  100. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  101. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  102. LEGACY: true
  103. runs-on: ${{ matrix.os }}
  104. steps:
  105. - uses: actions/checkout@v4
  106. - uses: ruby/setup-ruby@v1
  107. - name: Setup quickstart
  108. run: scripts/setup_quickstart.sh storage
  109. - name: Install Secret GoogleService-Info.plist
  110. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  111. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  112. - name: Xcode
  113. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  114. - name: Test quickstart
  115. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage false ${{ matrix.swift }})
  116. quickstart-ftl-cron-only:
  117. # Don't run on private repo.
  118. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  119. env:
  120. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  121. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  122. LEGACY: true
  123. runs-on: macos-14
  124. steps:
  125. - uses: actions/checkout@v4
  126. - uses: ruby/setup-ruby@v1
  127. - uses: actions/setup-python@v4
  128. with:
  129. python-version: '3.11'
  130. - name: Setup quickstart
  131. run: scripts/setup_quickstart.sh storage
  132. - name: Install Secret GoogleService-Info.plist
  133. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  134. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  135. # - name: Build objc quickstart
  136. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage)
  137. - name: Build swift quickstart
  138. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift)
  139. - id: ftl_test
  140. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  141. with:
  142. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  143. testapp_dir: quickstart-ios/build-for-testing
  144. test_type: "xctest"
  145. pod-lib-lint:
  146. # Don't run on private repo unless it is a PR.
  147. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  148. strategy:
  149. matrix:
  150. target: [ios, tvos, macos, watchos]
  151. os: [macos-14, macos-13]
  152. include:
  153. - os: macos-14
  154. xcode: Xcode_15.3
  155. tests: --skip-tests
  156. - os: macos-13
  157. xcode: Xcode_15.2
  158. tests: --test-specs=unit
  159. runs-on: ${{ matrix.os }}
  160. steps:
  161. - uses: actions/checkout@v4
  162. - uses: ruby/setup-ruby@v1
  163. - name: Setup Bundler
  164. run: scripts/setup_bundler.sh
  165. - name: Xcodes
  166. run: ls -l /Applications/Xcode*
  167. - name: Xcode
  168. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  169. - name: Build and test
  170. run: |
  171. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.tests }} \
  172. --platforms=${{ matrix.target }}
  173. storage-cron-only:
  174. # Don't run on private repo.
  175. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  176. strategy:
  177. matrix:
  178. target: [ios, tvos, macos, watchos]
  179. os: [macos-14, macos-13]
  180. include:
  181. - os: macos-14
  182. xcode: Xcode_15.3
  183. - os: macos-13
  184. xcode: Xcode_15.2
  185. runs-on: ${{ matrix.os }}
  186. needs: pod-lib-lint
  187. steps:
  188. - uses: actions/checkout@v4
  189. - uses: ruby/setup-ruby@v1
  190. - name: Setup Bundler
  191. run: scripts/setup_bundler.sh
  192. - name: Xcode
  193. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  194. - name: PodLibLint Storage Cron
  195. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests