storage.yml 6.4 KB

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