functions.yml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. # TODO(Swift 6): Re-enable these tests.
  2. # name: functions
  3. # on:
  4. # workflow_dispatch:
  5. # pull_request:
  6. # paths:
  7. # - 'FirebaseFunctions**'
  8. # - 'FirebaseSharedSwift**'
  9. # - '.github/workflows/functions.yml'
  10. # - 'FirebaseAuth/Interop/*.h'
  11. # - 'FirebaseMessaging/Interop/*.h'
  12. # - 'FirebaseTestingSupport/Functions/**'
  13. # - 'FirebaseCombineSwift/Sources/Functions/**'
  14. # - 'scripts/setup_quickstart.sh'
  15. # - 'Gemfile*'
  16. # schedule:
  17. # # Run every day at 1am (PST) - cron uses UTC times
  18. # - cron: '0 9 * * *'
  19. # concurrency:
  20. # group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  21. # cancel-in-progress: true
  22. # jobs:
  23. # pod-lib-lint:
  24. # # Don't run on private repo unless it is a PR.
  25. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  26. # strategy:
  27. # matrix:
  28. # target: [ios, tvos, macos, watchos]
  29. # build-env:
  30. # - os: macos-15
  31. # xcode: Xcode_16.3
  32. # runs-on: ${{ matrix.build-env.os }}
  33. # steps:
  34. # - uses: actions/checkout@v4
  35. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  36. # - name: Xcode
  37. # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  38. # - name: Setup Bundler
  39. # run: scripts/setup_bundler.sh
  40. # - name: Integration Test Server
  41. # run: FirebaseFunctions/Backend/start.sh synchronous
  42. # - name: Build and test
  43. # run: |
  44. # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec \
  45. # --platforms=${{ matrix.target }}
  46. # spm-package-resolved:
  47. # runs-on: macos-14
  48. # env:
  49. # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  50. # outputs:
  51. # cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  52. # steps:
  53. # - uses: actions/checkout@v4
  54. # - name: Xcode
  55. # run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  56. # - name: Generate Swift Package.resolved
  57. # id: swift_package_resolve
  58. # run: |
  59. # swift package resolve
  60. # - name: Generate cache key
  61. # id: generate_cache_key
  62. # run: |
  63. # cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  64. # echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  65. # - uses: actions/cache/save@v4
  66. # id: cache
  67. # with:
  68. # path: .build
  69. # key: ${{ steps.generate_cache_key.outputs.cache_key }}
  70. # spm-integration:
  71. # # Don't run on private repo unless it is a PR.
  72. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  73. # needs: [spm-package-resolved]
  74. # strategy:
  75. # matrix:
  76. # os: [macos-15]
  77. # xcode: [Xcode_16.3]
  78. # runs-on: ${{ matrix.os }}
  79. # env:
  80. # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  81. # steps:
  82. # - uses: actions/checkout@v4
  83. # - uses: actions/cache/restore@v4
  84. # with:
  85. # path: .build
  86. # key: ${{needs.spm-package-resolved.outputs.cache_key}}
  87. # - name: Initialize xcodebuild
  88. # run: scripts/setup_spm_tests.sh
  89. # - name: Integration Test Server
  90. # run: FirebaseFunctions/Backend/start.sh synchronous
  91. # - name: Xcode
  92. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  93. # - name: iOS Swift Integration Tests (including Swift library)
  94. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsIntegration iOS spm
  95. # - name: iOS ObjC Integration Tests (using Swift library)
  96. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsObjCIntegration iOS spm
  97. # - name: Combine Unit Tests
  98. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsCombineUnit iOS spm
  99. # spm-unit:
  100. # # Don't run on private repo.
  101. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  102. # needs: [spm-package-resolved]
  103. # strategy:
  104. # matrix:
  105. # include:
  106. # - os: macos-14
  107. # xcode: Xcode_16.2
  108. # target: iOS
  109. # - os: macos-15
  110. # xcode: Xcode_16.3
  111. # target: iOS
  112. # - os: macos-15
  113. # xcode: Xcode_16.3
  114. # target: tvOS
  115. # - os: macos-15
  116. # xcode: Xcode_16.3
  117. # target: macOS
  118. # - os: macos-15
  119. # xcode: Xcode_16.3
  120. # target: watchOS
  121. # - os: macos-15
  122. # xcode: Xcode_16.3
  123. # target: catalyst
  124. # - os: macos-15
  125. # xcode: Xcode_16.3
  126. # target: visionOS
  127. # runs-on: ${{ matrix.os }}
  128. # steps:
  129. # - uses: actions/checkout@v4
  130. # - uses: actions/cache/restore@v4
  131. # with:
  132. # path: .build
  133. # key: ${{needs.spm-package-resolved.outputs.cache_key}}
  134. # - name: Xcode
  135. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  136. # - name: Install visionOS, if needed.
  137. # if: matrix.target == 'visionOS'
  138. # run: xcodebuild -downloadPlatform visionOS
  139. # - name: Initialize xcodebuild
  140. # run: scripts/setup_spm_tests.sh
  141. # - name: Unit Tests
  142. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
  143. # TODO: Move to macos-15 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  144. # quickstart:
  145. # # Don't run on private repo unless it is a PR.
  146. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  147. # env:
  148. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  149. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  150. # LEGACY: true
  151. # # TODO: Move to macos-15 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  152. # runs-on: macos-12
  153. # steps:
  154. # - uses: actions/checkout@v4
  155. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  156. # - name: Setup quickstart
  157. # run: scripts/setup_quickstart.sh functions
  158. # - name: install secret googleservice-info.plist
  159. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  160. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  161. # - name: Setup custom URL scheme
  162. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  163. # - name: Test objc quickstart
  164. # run: ([ -z $plist_secret ] ||
  165. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  166. # - name: Test swift quickstart
  167. # run: ([ -z $plist_secret ] ||
  168. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  169. # quickstart-ftl-cron-only:
  170. # # Don't run on private repo
  171. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  172. # env:
  173. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  174. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  175. # LEGACY: true
  176. # # TODO: Move to macos-15 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  177. # runs-on: macos-12
  178. # steps:
  179. # - uses: actions/checkout@v4
  180. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  181. # - uses: actions/setup-python@v5
  182. # with:
  183. # python-version: '3.11'
  184. # - name: Setup quickstart
  185. # run: scripts/setup_quickstart.sh functions
  186. # - name: install secret googleservice-info.plist
  187. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  188. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  189. # - name: Setup custom URL scheme
  190. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  191. # - name: Build objc quickstart
  192. # run: ([ -z $plist_secret ] ||
  193. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
  194. # - name: Build swift quickstart
  195. # run: ([ -z $plist_secret ] ||
  196. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
  197. # - id: ftl_test
  198. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  199. # with:
  200. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  201. # testapp_dir: quickstart-ios/build-for-testing
  202. # test_type: "xctest"
  203. # functions-cron-only:
  204. # # Don't run on private repo.
  205. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  206. # runs-on: macos-14
  207. # strategy:
  208. # matrix:
  209. # target: [ios, tvos, macos]
  210. # flags: [
  211. # '--use-static-frameworks',
  212. # ]
  213. # needs: pod-lib-lint
  214. # steps:
  215. # - uses: actions/checkout@v4
  216. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  217. # - name: Xcode
  218. # run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  219. # - name: Setup Bundler
  220. # run: scripts/setup_bundler.sh
  221. # - name: Integration Test Server
  222. # run: FirebaseFunctions/Backend/start.sh synchronous
  223. # - name: PodLibLint Functions Cron
  224. # run: |
  225. # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  226. # FirebaseFunctions.podspec --platforms=${{ matrix.target }} --use-static-frameworks