functions.yml 8.1 KB

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