storage.yml 6.4 KB

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