storage.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. name: storage
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseStorage**'
  9. - 'FirebaseAuth/Interop/*.h'
  10. - '.github/workflows/storage.yml'
  11. - '.github/workflows/common.yml'
  12. - '.github/workflows/common_cocoapods.yml'
  13. - '.github/workflows/common_catalyst.yml'
  14. - '.github/workflows/common_quickstart.yml'
  15. # Rebuild on Ruby infrastructure changes.
  16. - 'Gemfile*'
  17. schedule:
  18. # Run every day at 1am (PDT) / 4am (EDT) - cron uses UTC times
  19. - cron: '0 8 * * *'
  20. concurrency:
  21. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  22. cancel-in-progress: true
  23. jobs:
  24. spm:
  25. uses: ./.github/workflows/common.yml
  26. with:
  27. target: FirebaseStorageUnit
  28. catalyst:
  29. uses: ./.github/workflows/common_catalyst.yml
  30. with:
  31. product: FirebaseStorage
  32. target: FirebaseStorage-Unit-unit
  33. storage-integration-tests:
  34. # Don't run on private repo unless it is a PR.
  35. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  36. strategy:
  37. matrix:
  38. language: [Swift, ObjC]
  39. include:
  40. - os: macos-15
  41. xcode: Xcode_16.4
  42. env:
  43. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  44. runs-on: ${{ matrix.os }}
  45. steps:
  46. - uses: actions/checkout@v4
  47. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  48. with:
  49. cache_key: integration${{ matrix.os }}
  50. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  51. - name: Setup Bundler
  52. run: scripts/setup_bundler.sh
  53. - name: Install xcpretty
  54. run: gem install xcpretty
  55. - name: Install Secret GoogleService-Info.plist
  56. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  57. FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  58. - name: Install Credentials.h
  59. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  60. FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret"
  61. - name: Install Credentials.swift
  62. run: |
  63. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  64. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  65. - name: Xcode
  66. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  67. - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  68. with:
  69. timeout_minutes: 15
  70. max_attempts: 3
  71. retry_wait_seconds: 120
  72. command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all)
  73. quickstart:
  74. # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed.
  75. uses: ./.github/workflows/common_quickstart.yml
  76. with:
  77. product: Storage
  78. quickstart_type: swift
  79. is_legacy: true
  80. setup_command: scripts/setup_quickstart.sh storage
  81. plist_src_path: scripts/gha-encrypted/qs-storage.plist.gpg
  82. plist_dst_path: quickstart-ios/storage/GoogleService-Info.plist
  83. run_tests: false
  84. secrets:
  85. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  86. quickstart-ftl-cron-only:
  87. # Don't run on private repo.
  88. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  89. env:
  90. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. LEGACY: true
  92. runs-on: macos-15
  93. steps:
  94. - uses: actions/checkout@v4
  95. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  96. - uses: actions/setup-python@v5
  97. with:
  98. python-version: '3.11'
  99. - name: Setup quickstart
  100. run: scripts/setup_quickstart.sh storage
  101. - name: Install Secret GoogleService-Info.plist
  102. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  103. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  104. # - name: Build objc quickstart
  105. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage)
  106. - name: Build swift quickstart
  107. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift)
  108. - id: ftl_test
  109. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  110. with:
  111. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  112. testapp_dir: quickstart-ios/build-for-testing
  113. test_type: "xctest"
  114. pod_lib_lint:
  115. uses: ./.github/workflows/common_cocoapods.yml
  116. with:
  117. product: FirebaseStorage
  118. test_specs: unit
  119. storage-cron-only:
  120. # Don't run on private repo.
  121. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  122. strategy:
  123. matrix:
  124. target: [ios, tvos, macos, watchos]
  125. build-env:
  126. - os: macos-14
  127. xcode: Xcode_16.2
  128. - os: macos-15
  129. xcode: Xcode_16.4
  130. runs-on: ${{ matrix.build-env.os }}
  131. needs: pod_lib_lint
  132. steps:
  133. - uses: actions/checkout@v4
  134. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  135. - name: Setup Bundler
  136. run: scripts/setup_bundler.sh
  137. - name: Xcode
  138. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  139. - name: PodLibLint Storage Cron
  140. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests