installations.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. name: installations
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInstallations**'
  6. - '.github/workflows/installations.yml'
  7. - 'Gemfile'
  8. schedule:
  9. # Run every day at 3am (PST) - cron uses UTC times
  10. # This is set to 3 hours after zip workflow finishes so zip testing can run after.
  11. - cron: '0 11 * * *'
  12. jobs:
  13. pod-lib-lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  16. runs-on: macOS-latest
  17. env:
  18. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  19. strategy:
  20. matrix:
  21. target: [ios, tvos, macos]
  22. steps:
  23. - uses: actions/checkout@v2
  24. - name: Setup Bundler
  25. run: scripts/setup_bundler.sh
  26. - name: Install GoogleService-Info.plist
  27. run: |
  28. mkdir -p FirebaseInstallations/Source/Tests/Resources
  29. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  30. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  31. - name: Get boolean for secrets available
  32. id: secrets
  33. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  34. - name: Build and test
  35. run: |
  36. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  37. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  38. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  39. --platforms=${{ matrix.target }} --ignore-local-podspecs=FirebaseInstanceID.podspec
  40. # TODO - Catalyst is disabled because `pod gen` does not have a way to get some dependent pods
  41. # from a local path and the Installations podspec requires that FirebaseInstanceID.podspec not be
  42. # the local version.
  43. #
  44. # catalyst:
  45. # runs-on: macOS-latest
  46. # steps:
  47. # - uses: actions/checkout@v2
  48. # - name: Setup Bundler
  49. # run: scripts/setup_bundler.sh
  50. # - name: Setup project and Build for Catalyst
  51. # # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  52. # run: scripts/test_catalyst.sh FirebaseInstallations build FirebaseInstallations-Unit-unit
  53. quickstart_framework:
  54. # Don't run on private repo
  55. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  56. env:
  57. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  58. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  59. FRAMEWORK_ZIP: "Firebase-actions-dir.zip"
  60. SDK: "Installations"
  61. runs-on: macOS-latest
  62. steps:
  63. - uses: actions/checkout@v2
  64. - name: Pull zip from GCS
  65. run: scripts/pull_zip_gcloud.sh "$plist_secret" "$FRAMEWORK_ZIP" "${HOME}/ios_frameworks"
  66. - name: Setup quickstart
  67. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  68. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/PromisesObjC.xcframework \
  69. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \
  70. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \
  71. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework
  72. - name: Copy mock plist
  73. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/"${SDK}"/GoogleService-Info.plist
  74. - name: Test Quickstart
  75. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  76. - name: Remove data before upload
  77. if: ${{ failure() }}
  78. run: scripts/remove_data.sh "${SDK}"
  79. - uses: actions/upload-artifact@v2
  80. if: ${{ failure() }}
  81. with:
  82. name: quickstart_artifacts
  83. path: quickstart-ios/
  84. quickstart:
  85. # Don't run on private repo unless it is a PR.
  86. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  87. runs-on: macOS-latest
  88. steps:
  89. - uses: actions/checkout@v2
  90. - name: Setup quickstart
  91. run: scripts/setup_quickstart.sh installations
  92. - name: Copy mock plist
  93. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  94. - name: Test objc quickstart
  95. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations
  96. - name: Test swift quickstart
  97. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift
  98. installations-cron-only:
  99. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  100. runs-on: macos-latest
  101. env:
  102. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  104. strategy:
  105. matrix:
  106. target: [ios, tvos, macos]
  107. flags: [
  108. '--use-modular-headers',
  109. '--use-libraries'
  110. ]
  111. needs: pod-lib-lint
  112. steps:
  113. - uses: actions/checkout@v2
  114. - name: Setup Bundler
  115. run: scripts/setup_bundler.sh
  116. - name: Install GoogleService-Info.plist
  117. run: |
  118. mkdir -p FirebaseInstallations/Source/Tests/Resources
  119. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  120. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  121. - name: Get boolean for secrets available
  122. id: secrets
  123. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  124. - name: PodLibLint Installations Cron
  125. run: |
  126. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  127. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  128. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  129. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  130. --ignore-local-podspecs=FirebaseInstanceID.podspec