storage.yml 6.4 KB

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