storage.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: actions/checkout@v3
  86. - uses: ruby/setup-ruby@v1
  87. - name: Setup quickstart
  88. run: scripts/setup_quickstart.sh storage
  89. - name: Install Secret GoogleService-Info.plist
  90. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  91. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  92. - name: Test objc quickstart
  93. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  94. - name: Test swift quickstart
  95. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  96. pod-lib-lint:
  97. # Don't run on private repo unless it is a PR.
  98. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  99. runs-on: macos-12
  100. strategy:
  101. matrix:
  102. target: [ios, tvos, macos]
  103. steps:
  104. - uses: actions/checkout@v3
  105. - uses: ruby/setup-ruby@v1
  106. - name: Setup Bundler
  107. run: scripts/setup_bundler.sh
  108. - name: Build and test
  109. run: |
  110. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --test-specs=unit --platforms=${{ matrix.target }}
  111. storage-cron-only:
  112. # Don't run on private repo.
  113. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  114. runs-on: macos-12
  115. strategy:
  116. matrix:
  117. target: [ios, tvos, macos]
  118. needs: pod-lib-lint
  119. steps:
  120. - uses: actions/checkout@v3
  121. - uses: ruby/setup-ruby@v1
  122. - name: Setup Bundler
  123. run: scripts/setup_bundler.sh
  124. - name: PodLibLint Storage Cron
  125. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests