storage.yml 4.9 KB

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