storage.yml 7.7 KB

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