storage.yml 6.5 KB

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