storage.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. FirebaseStorage/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. FirebaseStorage/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. FirebaseStorageSwift/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 FirebaseStorageObjC test FirebaseStorageObjC-Unit-unit
  87. # TODO: Restore Quickstart when ported for Firebase 9.
  88. # quickstart:
  89. # # Don't run on private repo unless it is a PR.
  90. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  91. # env:
  92. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  93. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  94. # LEGACY: true
  95. # runs-on: macos-11
  96. # steps:
  97. # - uses: actions/checkout@v2
  98. # - name: Setup quickstart
  99. # run: scripts/setup_quickstart.sh storage
  100. # - name: Install Secret GoogleService-Info.plist
  101. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  102. # quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  103. # - name: Test objc quickstart
  104. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  105. # - name: Test swift quickstart
  106. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  107. pod-lib-lint:
  108. # Don't run on private repo unless it is a PR.
  109. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  110. runs-on: macos-11
  111. strategy:
  112. matrix:
  113. target: [ios, tvos, macos, watchos]
  114. podspec: [Storage, StorageObjC]
  115. steps:
  116. - uses: actions/checkout@v2
  117. - name: Setup Bundler
  118. run: scripts/setup_bundler.sh
  119. - name: Build and test
  120. run: |
  121. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb Firebase${{ matrix.podspec }}.podspec --test-specs=unit --platforms=${{ matrix.target }}
  122. storage-cron-only:
  123. # Don't run on private repo.
  124. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  125. runs-on: macos-11
  126. strategy:
  127. matrix:
  128. target: [ios, tvos, macos, watchos]
  129. podspec: [Storage, StorageObjC]
  130. needs: pod-lib-lint
  131. steps:
  132. - uses: actions/checkout@v2
  133. - name: Setup Bundler
  134. run: scripts/setup_bundler.sh
  135. - name: PodLibLint Storage Cron
  136. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb Firebase${{ matrix.podspec }}.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests