storage.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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-11
  24. steps:
  25. - uses: actions/checkout@v2
  26. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  27. with:
  28. cache_key: ${{ matrix.os }}
  29. - name: Setup Bundler
  30. run: scripts/setup_bundler.sh
  31. - name: Install Secret GoogleService-Info.plist
  32. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
  33. FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  34. - name: Install Credentials.h
  35. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
  36. FirebaseStorageInternal/Tests/Integration/Credentials.h "$plist_secret"
  37. - name: Install Credentials.swift
  38. run: |
  39. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
  40. FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
  41. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  42. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Storage all)
  43. spm:
  44. # Don't run on private repo unless it is a PR.
  45. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  46. runs-on: macos-11
  47. steps:
  48. - uses: actions/checkout@v2
  49. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  50. with:
  51. cache_key: ${{ matrix.os }}
  52. - name: Initialize xcodebuild
  53. run: scripts/setup_spm_tests.sh
  54. - name: Objective-C Unit Tests
  55. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit iOS spm
  56. - name: Swift Unit Tests
  57. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit iOS spm
  58. spm-cron:
  59. # Don't run on private repo.
  60. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  61. runs-on: macos-11
  62. strategy:
  63. matrix:
  64. target: [tvOS, macOS, catalyst, watchOS]
  65. steps:
  66. - uses: actions/checkout@v2
  67. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  68. with:
  69. cache_key: ${{ matrix.os }}
  70. - name: Initialize xcodebuild
  71. run: scripts/setup_spm_tests.sh
  72. - name: Unit Tests
  73. run: scripts/third_party/travis/retry.sh ./scripts/build.sh StorageUnit ${{ matrix.target }} spm
  74. catalyst:
  75. # Don't run on private repo unless it is a PR.
  76. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  77. runs-on: macos-11
  78. steps:
  79. - uses: actions/checkout@v2
  80. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  81. with:
  82. cache_key: ${{ matrix.os }}
  83. - name: Setup Bundler
  84. run: scripts/setup_bundler.sh
  85. - name: Setup project and Build for Catalyst
  86. run: scripts/test_catalyst.sh FirebaseStorageInternal test FirebaseStorageInternal-Unit-unit
  87. quickstart:
  88. # Don't run on private repo unless it is a PR.
  89. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  90. env:
  91. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  92. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  93. LEGACY: true
  94. runs-on: macos-11
  95. steps:
  96. - uses: actions/checkout@v2
  97. - name: Setup quickstart
  98. run: scripts/setup_quickstart.sh storage
  99. - name: Install Secret GoogleService-Info.plist
  100. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  101. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  102. - name: Test objc quickstart
  103. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  104. - name: Test swift quickstart
  105. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  106. pod-lib-lint:
  107. # Don't run on private repo unless it is a PR.
  108. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  109. runs-on: macos-11
  110. strategy:
  111. matrix:
  112. target: [ios, tvos, macos, watchos]
  113. podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
  114. steps:
  115. - uses: actions/checkout@v2
  116. - name: Setup Bundler
  117. run: scripts/setup_bundler.sh
  118. - name: Build and test
  119. run: |
  120. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}
  121. storage-cron-only:
  122. # Don't run on private repo.
  123. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  124. runs-on: macos-11
  125. strategy:
  126. matrix:
  127. target: [ios, tvos, macos, watchos]
  128. podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
  129. needs: pod-lib-lint
  130. steps:
  131. - uses: actions/checkout@v2
  132. - name: Setup Bundler
  133. run: scripts/setup_bundler.sh
  134. - name: PodLibLint Storage Cron
  135. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests