storage.yml 6.7 KB

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