functions.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 2am (PDT) / 5am (EDT) - 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: The legacy quickstart uses material which doesn't build on Xcode 15.
  46. # quickstart:
  47. # uses: ./.github/workflows/common_quickstart.yml
  48. # strategy:
  49. # matrix:
  50. # quickstart_type: [objc, swift]
  51. # with:
  52. # product: Functions
  53. # is_legacy: true
  54. # setup_command: |
  55. # scripts/setup_quickstart.sh functions
  56. # sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  57. # plist_src_path: scripts/gha-encrypted/qs-functions.plist.gpg
  58. # plist_dst_path: quickstart-ios/functions/GoogleService-Info.plist
  59. # quickstart_type: ${{ matrix.quickstart_type }}
  60. # secrets:
  61. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  62. # quickstart-ftl-cron-only:
  63. # # Don't run on private repo
  64. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  65. # env:
  66. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  67. # LEGACY: true
  68. # # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
  69. # runs-on: macos-12
  70. # steps:
  71. # - uses: actions/checkout@v4
  72. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  73. # - uses: actions/setup-python@v5
  74. # with:
  75. # python-version: '3.11'
  76. # - name: Setup quickstart
  77. # run: scripts/setup_quickstart.sh functions
  78. # - name: install secret googleservice-info.plist
  79. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  80. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  81. # - name: Setup custom URL scheme
  82. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  83. # - name: Build objc quickstart
  84. # run: ([ -z $plist_secret ] ||
  85. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
  86. # - name: Build swift quickstart
  87. # run: ([ -z $plist_secret ] ||
  88. # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
  89. # - id: ftl_test
  90. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  91. # with:
  92. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  93. # testapp_dir: quickstart-ios/build-for-testing
  94. # test_type: "xctest"
  95. functions-cron-only:
  96. # Don't run on private repo.
  97. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  98. runs-on: macos-14
  99. strategy:
  100. matrix:
  101. target: [ios, tvos, macos]
  102. flags: [
  103. '--use-static-frameworks',
  104. ]
  105. needs: pod_lib_lint
  106. steps:
  107. - uses: actions/checkout@v4
  108. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  109. - name: Xcode
  110. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  111. - name: Setup Bundler
  112. run: scripts/setup_bundler.sh
  113. - name: Integration Test Server
  114. run: FirebaseFunctions/Backend/start.sh synchronous
  115. - name: PodLibLint Functions Cron
  116. run: |
  117. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  118. FirebaseFunctions.podspec --platforms=${{ matrix.target }} --use-static-frameworks