functions.yml 5.4 KB

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