storage.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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@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. FirebaseStorageInternal/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. FirebaseStorageInternal/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/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@v2
  52. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  53. with:
  54. cache_key: ${{ matrix.os }}
  55. - name: Initialize xcodebuild
  56. run: scripts/setup_spm_tests.sh
  57. - name: Objective-C Unit Tests
  58. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit iOS spm
  59. - name: Swift Unit Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit iOS spm
  61. spm-cron:
  62. # Don't run on private repo.
  63. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  64. runs-on: macos-12
  65. strategy:
  66. matrix:
  67. target: [tvOS, macOS, catalyst, watchOS]
  68. steps:
  69. - uses: actions/checkout@v2
  70. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  71. with:
  72. cache_key: ${{ matrix.os }}
  73. - name: Initialize xcodebuild
  74. run: scripts/setup_spm_tests.sh
  75. - name: Unit Tests
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit ${{ matrix.target }} spm
  77. catalyst:
  78. # Don't run on private repo unless it is a PR.
  79. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  80. runs-on: macos-12
  81. steps:
  82. - uses: actions/checkout@v2
  83. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  84. with:
  85. cache_key: ${{ matrix.os }}
  86. - uses: ruby/setup-ruby@v1
  87. - name: Setup Bundler
  88. run: scripts/setup_bundler.sh
  89. - name: Setup project and Build for Catalyst
  90. run: scripts/test_catalyst.sh FirebaseStorageInternal test FirebaseStorageInternal-Unit-unit
  91. quickstart:
  92. # Don't run on private repo unless it is a PR.
  93. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  94. env:
  95. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  96. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  97. LEGACY: true
  98. runs-on: macos-12
  99. steps:
  100. - uses: actions/checkout@v2
  101. - uses: actions/checkout@v2
  102. - uses: ruby/setup-ruby@v1
  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-12
  116. strategy:
  117. matrix:
  118. target: [ios, tvos, macos, watchos]
  119. podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
  120. steps:
  121. - uses: actions/checkout@v2
  122. - uses: ruby/setup-ruby@v1
  123. - name: Setup Bundler
  124. run: scripts/setup_bundler.sh
  125. - name: Build and test
  126. run: |
  127. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}
  128. storage-cron-only:
  129. # Don't run on private repo.
  130. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  131. runs-on: macos-12
  132. strategy:
  133. matrix:
  134. target: [ios, tvos, macos, watchos]
  135. podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
  136. needs: pod-lib-lint
  137. steps:
  138. - uses: actions/checkout@v2
  139. - uses: ruby/setup-ruby@v1
  140. - name: Setup Bundler
  141. run: scripts/setup_bundler.sh
  142. - name: PodLibLint Storage Cron
  143. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests