functions.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. name: functions
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseFunctions**'
  9. - 'FirebaseSharedSwift**'
  10. - '.github/workflows/functions.yml'
  11. - '.github/workflows/common.yml'
  12. - '.github/workflows/common_cocoapods.yml'
  13. - 'FirebaseAuth/Interop/*.h'
  14. - 'FirebaseMessaging/Interop/*.h'
  15. - 'FirebaseTestingSupport/Functions/**'
  16. - 'FirebaseCombineSwift/Sources/Functions/**'
  17. - 'scripts/setup_quickstart.sh'
  18. - 'Gemfile*'
  19. schedule:
  20. # Run every day at 1am (PST) - cron uses UTC times
  21. - cron: '0 9 * * *'
  22. concurrency:
  23. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  24. cancel-in-progress: true
  25. jobs:
  26. pod_lib_lint:
  27. uses: ./.github/workflows/common_cocoapods.yml
  28. with:
  29. product: FirebaseFunctions
  30. supports_swift6: true
  31. setup_command: FirebaseFunctions/Backend/start.sh synchronous
  32. spm-integration:
  33. uses: ./.github/workflows/common.yml
  34. strategy:
  35. matrix:
  36. target: [FirebaseFunctionsIntegration, FirebaseFunctionsObjCIntegration, FunctionsCombineUnit]
  37. with:
  38. target: ${{ matrix.target }}
  39. platforms: iOS
  40. setup_command: FirebaseFunctions/Backend/start.sh synchronous
  41. spm-unit:
  42. uses: ./.github/workflows/common.yml
  43. with:
  44. target: FirebaseFunctionsUnit
  45. # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  46. # quickstart:
  47. # # Don't run on private repo unless it is a PR.
  48. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  49. # env:
  50. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  51. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  52. # LEGACY: true
  53. # # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  54. # runs-on: macos-12
  55. # steps:
  56. # - uses: actions/checkout@v4
  57. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  58. # - name: Setup quickstart
  59. # run: scripts/setup_quickstart.sh functions
  60. # - name: install secret googleservice-info.plist
  61. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  62. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  63. # - name: Setup custom URL scheme
  64. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  65. # - name: Test objc quickstart
  66. # run: ([ -z $plist_secret ] ||
  67. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  68. # - name: Test swift quickstart
  69. # run: ([ -z $plist_secret ] ||
  70. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  71. # quickstart-ftl-cron-only:
  72. # # Don't run on private repo
  73. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  74. # env:
  75. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  76. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  77. # LEGACY: true
  78. # # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  79. # runs-on: macos-12
  80. # steps:
  81. # - uses: actions/checkout@v4
  82. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  83. # - uses: actions/setup-python@v5
  84. # with:
  85. # python-version: '3.11'
  86. # - name: Setup quickstart
  87. # run: scripts/setup_quickstart.sh functions
  88. # - name: install secret googleservice-info.plist
  89. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  90. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  91. # - name: Setup custom URL scheme
  92. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  93. # - name: Build objc quickstart
  94. # run: ([ -z $plist_secret ] ||
  95. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
  96. # - name: Build swift quickstart
  97. # run: ([ -z $plist_secret ] ||
  98. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
  99. # - id: ftl_test
  100. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  101. # with:
  102. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  103. # testapp_dir: quickstart-ios/build-for-testing
  104. # test_type: "xctest"
  105. functions-cron-only:
  106. # Don't run on private repo.
  107. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  108. runs-on: macos-14
  109. strategy:
  110. matrix:
  111. target: [ios, tvos, macos]
  112. flags: [
  113. '--use-static-frameworks',
  114. ]
  115. needs: pod_lib_lint
  116. steps:
  117. - uses: actions/checkout@v4
  118. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  119. - name: Xcode
  120. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  121. - name: Setup Bundler
  122. run: scripts/setup_bundler.sh
  123. - name: Integration Test Server
  124. run: FirebaseFunctions/Backend/start.sh synchronous
  125. - name: PodLibLint Functions Cron
  126. run: |
  127. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  128. FirebaseFunctions.podspec --platforms=${{ matrix.target }} --use-static-frameworks