storage.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. name: storage
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - 'FirebaseStorage**'
  7. - 'FirebaseAuth/Interop/*.h'
  8. - '.github/workflows/storage.yml'
  9. # Rebuild on Ruby infrastructure changes.
  10. - 'Gemfile*'
  11. schedule:
  12. # Run every day at 12am (PST) - cron uses UTC times
  13. - cron: '0 8 * * *'
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  16. cancel-in-progress: true
  17. jobs:
  18. spm:
  19. uses: ./.github/workflows/common.yml
  20. with:
  21. target: FirebaseStorageUnit
  22. catalyst:
  23. uses: ./.github/workflows/common_catalyst.yml
  24. with:
  25. product: FirebaseStorage
  26. target: FirebaseStorage-Unit-unit
  27. storage-integration-tests:
  28. # Don't run on private repo unless it is a PR.
  29. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  30. strategy:
  31. matrix:
  32. language: [Swift, ObjC]
  33. include:
  34. - os: macos-15
  35. xcode: Xcode_16.3
  36. env:
  37. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  38. runs-on: ${{ matrix.os }}
  39. steps:
  40. - uses: actions/checkout@v4
  41. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  42. with:
  43. cache_key: integration${{ matrix.os }}
  44. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Install xcpretty
  48. run: gem install xcpretty
  49. - name: Install Secret GoogleService-Info.plist
  50. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  51. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  52. - name: Install Credentials.h
  53. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  54. FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
  55. - name: Install Credentials.swift
  56. run: |
  57. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  58. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  59. - name: Xcode
  60. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  61. - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  62. with:
  63. timeout_minutes: 120
  64. max_attempts: 3
  65. retry_on: error
  66. retry_wait_seconds: 120
  67. command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all)
  68. quickstart:
  69. # Don't run on private repo unless it is a PR.
  70. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  71. # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed.
  72. strategy:
  73. matrix:
  74. include:
  75. #- os: macos-13
  76. # xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15.
  77. - swift: swift
  78. os: macos-15
  79. xcode: Xcode_16.2
  80. env:
  81. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  82. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  83. LEGACY: true
  84. runs-on: ${{ matrix.os }}
  85. steps:
  86. - uses: actions/checkout@v4
  87. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  88. - name: Setup quickstart
  89. run: scripts/setup_quickstart.sh storage
  90. - name: Install Secret GoogleService-Info.plist
  91. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  92. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  93. - name: Xcode
  94. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  95. - name: Test quickstart
  96. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage false ${{ matrix.swift }})
  97. quickstart-ftl-cron-only:
  98. # Don't run on private repo.
  99. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  100. env:
  101. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  102. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. LEGACY: true
  104. runs-on: macos-15
  105. steps:
  106. - uses: actions/checkout@v4
  107. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  108. - uses: actions/setup-python@v5
  109. with:
  110. python-version: '3.11'
  111. - name: Setup quickstart
  112. run: scripts/setup_quickstart.sh storage
  113. - name: Install Secret GoogleService-Info.plist
  114. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  115. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  116. # - name: Build objc quickstart
  117. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage)
  118. - name: Build swift quickstart
  119. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift)
  120. - id: ftl_test
  121. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  122. with:
  123. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  124. testapp_dir: quickstart-ios/build-for-testing
  125. test_type: "xctest"
  126. pod-lib-lint:
  127. # Don't run on private repo unless it is a PR.
  128. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  129. strategy:
  130. matrix:
  131. target: [ios, tvos, macos, watchos]
  132. build-env:
  133. - os: macos-15
  134. xcode: Xcode_16.2
  135. tests: --skip-tests
  136. - os: macos-15
  137. xcode: Xcode_16.2
  138. tests: --test-specs=unit
  139. runs-on: ${{ matrix.build-env.os }}
  140. steps:
  141. - uses: actions/checkout@v4
  142. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  143. - name: Setup Bundler
  144. run: scripts/setup_bundler.sh
  145. - name: Xcodes
  146. run: ls -l /Applications/Xcode*
  147. - name: Xcode
  148. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  149. - name: Build and test
  150. run: |
  151. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.build-env.tests }} \
  152. --platforms=${{ matrix.target }}
  153. storage-cron-only:
  154. # Don't run on private repo.
  155. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  156. strategy:
  157. matrix:
  158. target: [ios, tvos, macos, watchos]
  159. build-env:
  160. - os: macos-14
  161. xcode: Xcode_16.2
  162. - os: macos-15
  163. xcode: Xcode_16.2
  164. runs-on: ${{ matrix.build-env.os }}
  165. needs: pod-lib-lint
  166. steps:
  167. - uses: actions/checkout@v4
  168. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  169. - name: Setup Bundler
  170. run: scripts/setup_bundler.sh
  171. - name: Xcode
  172. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  173. - name: PodLibLint Storage Cron
  174. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests