functions.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. name: functions
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseFunctions**'
  6. - 'FirebaseSharedSwift**'
  7. - '.github/workflows/functions.yml'
  8. - 'FirebaseAuth/Interop/*.h'
  9. - 'FirebaseMessaging/Interop/*.h'
  10. - 'FirebaseTestingSupport/Functions/**'
  11. - 'FirebaseCombineSwift/Sources/Functions/**'
  12. - 'scripts/setup_quickstart.sh'
  13. - 'Gemfile*'
  14. schedule:
  15. # Run every day at 1am (PST) - cron uses UTC times
  16. - cron: '0 9 * * *'
  17. jobs:
  18. pod-lib-lint:
  19. # Don't run on private repo unless it is a PR.
  20. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  21. runs-on: macos-11
  22. strategy:
  23. matrix:
  24. # TODO: The --skip-tests might be removable with Xcode 13.2+
  25. target: [ios, tvos, macos --skip-tests, watchos]
  26. steps:
  27. - uses: actions/checkout@v2
  28. - name: Setup Bundler
  29. run: scripts/setup_bundler.sh
  30. - name: Integration Test Server
  31. run: FirebaseFunctions/Backend/start.sh synchronous
  32. - name: Build and test
  33. run: |
  34. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec --platforms=${{ matrix.target }}
  35. spm-integration:
  36. # Don't run on private repo unless it is a PR.
  37. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  38. runs-on: macos-11
  39. env:
  40. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  41. steps:
  42. - uses: actions/checkout@v2
  43. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  44. with:
  45. cache_key: ${{ matrix.os }}
  46. - name: Initialize xcodebuild
  47. run: scripts/setup_spm_tests.sh
  48. - name: Integration Test Server
  49. run: FirebaseFunctions/Backend/start.sh synchronous
  50. - name: Functions Unit Tests
  51. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit iOS spm
  52. - name: iOS Swift Integration Tests (including Swift library)
  53. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsIntegration iOS spm
  54. - name: iOS ObjC Integration Tests (using Swift library)
  55. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsObjCIntegration iOS spm
  56. - name: Combine Unit Tests
  57. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsCombineUnit iOS spm
  58. spm-unit:
  59. # Don't run on private repo.
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. runs-on: macos-11
  62. strategy:
  63. matrix:
  64. target: [iOS, tvOS, macOS, catalyst, watchOS]
  65. steps:
  66. - uses: actions/checkout@v2
  67. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  68. with:
  69. cache_key: ${{ matrix.os }}
  70. - name: Initialize xcodebuild
  71. run: scripts/setup_spm_tests.sh
  72. - name: Unit Tests
  73. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
  74. # TODO: Restore Quickstart when ported for Firebase 9.
  75. # quickstart:
  76. # # Don't run on private repo unless it is a PR.
  77. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  78. # env:
  79. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  80. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  81. # LEGACY: true
  82. # runs-on: macos-11
  83. # steps:
  84. # - uses: actions/checkout@v2
  85. # - name: Setup quickstart
  86. # run: scripts/setup_quickstart.sh functions
  87. # - name: install secret googleservice-info.plist
  88. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  89. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  90. # - name: Setup custom URL scheme
  91. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  92. # - name: Test objc quickstart
  93. # run: ([ -z $plist_secret ] ||
  94. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  95. # - name: Test swift quickstart
  96. # run: ([ -z $plist_secret ] ||
  97. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  98. functions-cron-only:
  99. # Don't run on private repo.
  100. # TODO: Uncomment below
  101. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  102. runs-on: macos-11
  103. strategy:
  104. matrix:
  105. target: [ios, tvos, macos]
  106. flags: [
  107. '--use-static-frameworks',
  108. ]
  109. needs: pod-lib-lint
  110. steps:
  111. - uses: actions/checkout@v2
  112. - name: Setup Bundler
  113. run: scripts/setup_bundler.sh
  114. - name: Integration Test Server
  115. run: FirebaseFunctions/Backend/start.sh synchronous
  116. - name: PodLibLint Functions Cron
  117. run: |
  118. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  119. FirebaseFunctions.podspec --platforms=${{ matrix.target }} --use-static-frameworks