storage.yml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. catalyst:
  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: Setup Bundler
  48. run: scripts/setup_bundler.sh
  49. - name: Setup project and Build for Catalyst
  50. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  51. run: scripts/test_catalyst.sh FirebaseStorage build FirebaseStorage-Unit-unit
  52. quickstart:
  53. # Don't run on private repo unless it is a PR.
  54. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  55. env:
  56. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  57. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  58. runs-on: macOS-latest
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Setup quickstart
  62. run: scripts/setup_quickstart.sh storage
  63. - name: Install Secret GoogleService-Info.plist
  64. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  65. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  66. - name: Install Secret FIREGSignInInfo.h
  67. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  68. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  69. - name: Test objc quickstart
  70. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage)
  71. - name: Test swift quickstart
  72. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage swift)
  73. pod-lib-lint:
  74. # Don't run on private repo unless it is a PR.
  75. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  76. runs-on: macOS-latest
  77. strategy:
  78. matrix:
  79. # watchos is disabled since pod lib lint cannot handle test Auth dep even if the dep is only
  80. # specified for the other three platforms.
  81. target: [ios, tvos, macos]
  82. steps:
  83. - uses: actions/checkout@v2
  84. - name: Setup Bundler
  85. run: scripts/setup_bundler.sh
  86. - name: Build and test
  87. run: |
  88. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --skip-tests --platforms=${{ matrix.target }}
  89. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --skip-tests --platforms=${{ matrix.target }}
  90. storage-cron-only:
  91. # Don't run on private repo.
  92. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  93. runs-on: macos-latest
  94. strategy:
  95. matrix:
  96. target: [ios, tvos, macos]
  97. flags: [
  98. '--skip-tests --use-modular-headers',
  99. '--skip-tests --use-libraries'
  100. ]
  101. needs: pod-lib-lint
  102. steps:
  103. - uses: actions/checkout@v2
  104. - name: Setup Bundler
  105. run: scripts/setup_bundler.sh
  106. - name: PodLibLint Storage Cron
  107. run: |
  108. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  109. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}