storage.yml 8.3 KB

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