storage.yml 8.3 KB

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