storage.yml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. name: storage
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseStorage**'
  6. - 'Interop/Auth/Public/*.h'
  7. - '.github/workflows/storage.yml'
  8. - 'scripts/**'
  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. storage:
  19. # Don't run on private repo unless it is a PR.
  20. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  21. env:
  22. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  23. runs-on: macos-11
  24. strategy:
  25. matrix:
  26. pod: [Storage, StorageSwift]
  27. steps:
  28. - uses: actions/checkout@v2
  29. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  30. with:
  31. cache_key: ${{ matrix.os }}
  32. - name: Setup Bundler
  33. run: scripts/setup_bundler.sh
  34. - name: Install Secret GoogleService-Info.plist
  35. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  36. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  37. - name: Install Credentials.h
  38. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  39. FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
  40. - name: Install Credentials.swift
  41. run: |
  42. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  43. FirebaseStorage/Tests/SwiftIntegration/Credentials.swift "$plist_secret"
  44. cp FirebaseStorage/Tests/SwiftIntegration/Credentials.swift FirebaseStorageSwift/Tests/Integration/
  45. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  46. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh ${{ matrix.pod }} all)
  47. spm:
  48. # Don't run on private repo unless it is a PR.
  49. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  50. runs-on: macos-11
  51. steps:
  52. - uses: actions/checkout@v2
  53. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  54. with:
  55. cache_key: ${{ matrix.os }}
  56. - name: Initialize xcodebuild
  57. run: scripts/setup_spm_tests.sh
  58. - name: iOS Unit Tests
  59. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit iOS spm
  60. - name: Swift Build
  61. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageSwift-Beta iOS spmbuildonly
  62. spm-cron:
  63. # Don't run on private repo.
  64. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  65. runs-on: macos-11
  66. strategy:
  67. matrix:
  68. target: [tvOS, macOS, catalyst, watchOS]
  69. steps:
  70. - uses: actions/checkout@v2
  71. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  72. with:
  73. cache_key: ${{ matrix.os }}
  74. - name: Initialize xcodebuild
  75. run: scripts/setup_spm_tests.sh
  76. - name: Unit Tests
  77. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit ${{ matrix.target }} spm
  78. - name: Swift Build
  79. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageSwift-Beta ${{ matrix.target }} spmbuildonly
  80. catalyst:
  81. # Don't run on private repo unless it is a PR.
  82. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  83. runs-on: macos-11
  84. steps:
  85. - uses: actions/checkout@v2
  86. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  87. with:
  88. cache_key: ${{ matrix.os }}
  89. - name: Setup Bundler
  90. run: scripts/setup_bundler.sh
  91. - name: Setup project and Build for Catalyst
  92. run: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit
  93. quickstart:
  94. # Don't run on private repo unless it is a PR.
  95. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  96. env:
  97. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  98. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  99. LEGACY: true
  100. runs-on: macos-11
  101. steps:
  102. - uses: actions/checkout@v2
  103. - name: Setup quickstart
  104. run: scripts/setup_quickstart.sh storage
  105. - name: Install Secret GoogleService-Info.plist
  106. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  107. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  108. - name: Test objc quickstart
  109. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  110. - name: Test swift quickstart
  111. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  112. pod-lib-lint:
  113. # Don't run on private repo unless it is a PR.
  114. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  115. runs-on: macos-11
  116. strategy:
  117. matrix:
  118. target: [ios, tvos, macos, watchos]
  119. spec: [
  120. 'FirebaseStorage.podspec --test-specs=unit', # The integration tests need more set up.
  121. 'FirebaseStorageSwift.podspec --skip-tests' # No current unit tests.
  122. ]
  123. steps:
  124. - uses: actions/checkout@v2
  125. - name: Setup Bundler
  126. run: scripts/setup_bundler.sh
  127. - name: Build and test
  128. run: |
  129. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.spec }} --platforms=${{ matrix.target }}
  130. storage-cron-only:
  131. # Don't run on private repo.
  132. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  133. runs-on: macos-11
  134. strategy:
  135. matrix:
  136. target: [ios, tvos, macos, watchos]
  137. flags: [
  138. '--use-static-frameworks --skip-tests ',
  139. '--use-libraries --skip-tests '
  140. ]
  141. needs: pod-lib-lint
  142. steps:
  143. - uses: actions/checkout@v2
  144. - name: Setup Bundler
  145. run: scripts/setup_bundler.sh
  146. - name: PodLibLint Storage Cron
  147. run: |
  148. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  149. storageswift-cron-only:
  150. # Don't run on private repo.
  151. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  152. runs-on: macos-11
  153. strategy:
  154. matrix:
  155. target: [ios, tvos, macos, watchos]
  156. flags: [
  157. '--use-static-frameworks --skip-tests', # Swift pods do not support --use-libraries
  158. ]
  159. needs: pod-lib-lint
  160. steps:
  161. - uses: actions/checkout@v2
  162. - name: Setup Bundler
  163. run: scripts/setup_bundler.sh
  164. - name: PodLibLint Storage Cron
  165. run: |
  166. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}