functions.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. - '.github/workflows/common_cocoapods_cron.yml'
  14. - 'FirebaseAuth/Interop/*.h'
  15. - 'FirebaseMessaging/Interop/*.h'
  16. - 'FirebaseTestingSupport/Functions/**'
  17. - 'FirebaseCombineSwift/Sources/Functions/**'
  18. - 'scripts/setup_quickstart.sh'
  19. - 'Gemfile*'
  20. schedule:
  21. # Run every day at 2am (PDT) / 5am (EDT) - cron uses UTC times
  22. - cron: '0 9 * * *'
  23. concurrency:
  24. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  25. cancel-in-progress: true
  26. jobs:
  27. pod_lib_lint:
  28. uses: ./.github/workflows/common_cocoapods.yml
  29. with:
  30. product: FirebaseFunctions
  31. supports_swift6: true
  32. setup_command: FirebaseFunctions/Backend/start.sh synchronous
  33. spm-integration:
  34. uses: ./.github/workflows/common.yml
  35. strategy:
  36. matrix:
  37. target: [FirebaseFunctionsIntegration, FirebaseFunctionsObjCIntegration, FunctionsCombineUnit]
  38. with:
  39. target: ${{ matrix.target }}
  40. platforms: iOS
  41. setup_command: FirebaseFunctions/Backend/start.sh synchronous
  42. spm-unit:
  43. uses: ./.github/workflows/common.yml
  44. with:
  45. target: FirebaseFunctionsUnit
  46. # TODO: The legacy quickstart uses material which doesn't build on Xcode 15.
  47. # quickstart:
  48. # uses: ./.github/workflows/common_quickstart.yml
  49. # strategy:
  50. # matrix:
  51. # quickstart_type: [objc, swift]
  52. # with:
  53. # product: Functions
  54. # is_legacy: true
  55. # setup_command: |
  56. # scripts/setup_quickstart.sh functions
  57. # sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  58. # plist_src_path: scripts/gha-encrypted/qs-functions.plist.gpg
  59. # plist_dst_path: quickstart-ios/functions/GoogleService-Info.plist
  60. # quickstart_type: ${{ matrix.quickstart_type }}
  61. # secrets:
  62. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  63. # quickstart-ftl-cron-only:
  64. # # Don't run on private repo
  65. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  66. # env:
  67. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  68. # LEGACY: true
  69. # # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  70. # runs-on: macos-12
  71. # steps:
  72. # - uses: actions/checkout@v4
  73. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  74. # - uses: actions/setup-python@v5
  75. # with:
  76. # python-version: '3.11'
  77. # - name: Setup quickstart
  78. # run: scripts/setup_quickstart.sh functions
  79. # - name: install secret googleservice-info.plist
  80. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  81. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  82. # - name: Setup custom URL scheme
  83. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  84. # - name: Build objc quickstart
  85. # run: ([ -z $plist_secret ] ||
  86. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
  87. # - name: Build swift quickstart
  88. # run: ([ -z $plist_secret ] ||
  89. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
  90. # - id: ftl_test
  91. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  92. # with:
  93. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  94. # testapp_dir: quickstart-ios/build-for-testing
  95. # test_type: "xctest"
  96. functions-cron-only:
  97. needs: pod_lib_lint
  98. uses: ./.github/workflows/common_cocoapods_cron.yml
  99. with:
  100. product: FirebaseFunctions
  101. platforms: '[ "ios", "tvos", "macos" ]'
  102. flags: '[ "--use-static-frameworks" ]'
  103. setup_command: FirebaseFunctions/Backend/start.sh synchronous
  104. runs_on: macos-14
  105. xcode: Xcode_16.2