storage.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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 11pm (PST) - cron uses UTC times
  13. - cron: '0 7 * * *'
  14. jobs:
  15. storage:
  16. # Don't run on private repo unless it is a PR.
  17. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  18. env:
  19. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  20. runs-on: macos-latest
  21. strategy:
  22. matrix:
  23. pod: [Storage, StorageSwift]
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: Install Secret GoogleService-Info.plist
  29. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  30. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  31. - name: Install Credentials.h
  32. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  33. FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
  34. - name: Install Credentials.swift
  35. run: |
  36. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  37. FirebaseStorage/Tests/SwiftIntegration/Credentials.swift "$plist_secret"
  38. cp FirebaseStorage/Tests/SwiftIntegration/Credentials.swift FirebaseStorageSwift/Tests/Integration/
  39. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  40. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh ${{ matrix.pod }} all)
  41. spm:
  42. # Don't run on private repo unless it is a PR.
  43. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  44. runs-on: macOS-latest
  45. steps:
  46. - uses: actions/checkout@v2
  47. - name: Xcode 12
  48. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  49. - name: Initialize xcodebuild
  50. run: xcodebuild -list
  51. - name: iOS Unit Tests
  52. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit iOS spm
  53. - name: Swift Build
  54. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageSwift iOS spmbuildonly
  55. spm-cron:
  56. # Don't run on private repo.
  57. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  58. runs-on: macOS-latest
  59. strategy:
  60. matrix:
  61. target: [tvOS, macOS, catalyst]
  62. steps:
  63. - uses: actions/checkout@v2
  64. - name: Xcode 12
  65. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  66. - name: Initialize xcodebuild
  67. run: xcodebuild -list
  68. - name: Unit Tests
  69. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit ${{ matrix.target }} spm
  70. - name: Swift Build
  71. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageSwift ${{ matrix.target }} spmbuildonly
  72. catalyst:
  73. # Don't run on private repo unless it is a PR.
  74. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  75. runs-on: macOS-latest
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Setup Bundler
  79. run: scripts/setup_bundler.sh
  80. - name: Setup project and Build for Catalyst
  81. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  82. run: scripts/test_catalyst.sh FirebaseStorage build FirebaseStorage-Unit-unit
  83. quickstart:
  84. # Don't run on private repo unless it is a PR.
  85. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  86. env:
  87. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  88. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  89. runs-on: macOS-latest
  90. steps:
  91. - uses: actions/checkout@v2
  92. - name: Setup quickstart
  93. run: scripts/setup_quickstart.sh storage
  94. - name: Install Secret GoogleService-Info.plist
  95. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  96. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  97. - name: Install Secret FIREGSignInInfo.h
  98. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  99. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  100. - name: Test objc quickstart
  101. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage)
  102. - name: Test swift quickstart
  103. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage swift)
  104. pod-lib-lint:
  105. # Don't run on private repo unless it is a PR.
  106. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  107. runs-on: macOS-latest
  108. strategy:
  109. matrix:
  110. # watchos is disabled since pod lib lint cannot handle test Auth dep even if the dep is only
  111. # specified for the other three platforms.
  112. target: [ios, tvos, macos]
  113. steps:
  114. - uses: actions/checkout@v2
  115. - name: Setup Bundler
  116. run: scripts/setup_bundler.sh
  117. - name: Build and test
  118. run: |
  119. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --skip-tests --platforms=${{ matrix.target }}
  120. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --skip-tests --platforms=${{ matrix.target }}
  121. storage-cron-only:
  122. # Don't run on private repo.
  123. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  124. runs-on: macos-latest
  125. strategy:
  126. matrix:
  127. target: [ios, tvos, macos]
  128. flags: [
  129. '--skip-tests --use-modular-headers',
  130. '--skip-tests --use-libraries'
  131. ]
  132. needs: pod-lib-lint
  133. steps:
  134. - uses: actions/checkout@v2
  135. - name: Setup Bundler
  136. run: scripts/setup_bundler.sh
  137. - name: PodLibLint Storage Cron
  138. run: |
  139. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  140. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}