functions.yml 5.2 KB

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