functions.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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(ncooke3): Add a Functions quickstart test.
  47. # quickstart-ftl-cron-only:
  48. # # Don't run on private repo
  49. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  50. # env:
  51. # plist_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. # - uses: actions/setup-python@v5
  59. # with:
  60. # python-version: '3.11'
  61. # - name: Setup quickstart
  62. # run: scripts/setup_quickstart.sh functions
  63. # - name: install secret googleservice-info.plist
  64. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  65. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  66. # - name: Setup custom URL scheme
  67. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  68. # - name: Build objc quickstart
  69. # run: ([ -z $plist_secret ] ||
  70. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
  71. # - name: Build swift quickstart
  72. # run: ([ -z $plist_secret ] ||
  73. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
  74. # - id: ftl_test
  75. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  76. # with:
  77. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  78. # testapp_dir: quickstart-ios/build-for-testing
  79. # test_type: "xctest"
  80. functions-cron-only:
  81. needs: pod_lib_lint
  82. uses: ./.github/workflows/common_cocoapods_cron.yml
  83. with:
  84. product: FirebaseFunctions
  85. platforms: '[ "ios", "tvos", "macos" ]'
  86. flags: '[ "--use-static-frameworks" ]'
  87. setup_command: FirebaseFunctions/Backend/start.sh synchronous
  88. runs_on: macos-14
  89. xcode: Xcode_16.2