installations.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 11pm (PST) - cron uses UTC times
  10. - cron: '0 7 * * *'
  11. jobs:
  12. pod-lib-lint:
  13. # Don't run on private repo unless it is a PR.
  14. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  15. runs-on: macOS-latest
  16. env:
  17. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Install GoogleService-Info.plist
  26. run: |
  27. mkdir -p FirebaseInstallations/Source/Tests/Resources
  28. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  29. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  30. - name: Get boolean for secrets available
  31. id: secrets
  32. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  33. - name: Build and test
  34. run: |
  35. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  36. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  37. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  38. --platforms=${{ matrix.target }} --ignore-local-podspecs=FirebaseInstanceID.podspec
  39. # TODO - Catalyst is disabled because `pod gen` does not have a way to get some dependent pods
  40. # from a local path and the Installations podspec requires that FirebaseInstanceID.podspec not be
  41. # the local version.
  42. #
  43. # catalyst:
  44. # runs-on: macOS-latest
  45. # steps:
  46. # - uses: actions/checkout@v2
  47. # - name: Setup Bundler
  48. # run: scripts/setup_bundler.sh
  49. # - name: Setup project and Build for Catalyst
  50. # # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  51. # run: scripts/test_catalyst.sh FirebaseInstallations build FirebaseInstallations-Unit-unit
  52. quickstart:
  53. # Don't run on private repo unless it is a PR.
  54. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  55. runs-on: macOS-latest
  56. steps:
  57. - uses: actions/checkout@v2
  58. - name: Setup quickstart
  59. run: scripts/setup_quickstart.sh installations
  60. - name: Copy mock plist
  61. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  62. - name: Test objc quickstart
  63. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations
  64. - name: Test swift quickstart
  65. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift
  66. installations-cron-only:
  67. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  68. runs-on: macos-latest
  69. env:
  70. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  71. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  72. strategy:
  73. matrix:
  74. target: [ios, tvos, macos]
  75. flags: [
  76. '--use-modular-headers',
  77. '--use-libraries'
  78. ]
  79. needs: pod-lib-lint
  80. steps:
  81. - uses: actions/checkout@v2
  82. - name: Setup Bundler
  83. run: scripts/setup_bundler.sh
  84. - name: Install GoogleService-Info.plist
  85. run: |
  86. mkdir -p FirebaseInstallations/Source/Tests/Resources
  87. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  88. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  89. - name: Get boolean for secrets available
  90. id: secrets
  91. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  92. - name: PodLibLint Installations Cron
  93. run: |
  94. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  95. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  96. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  97. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  98. --ignore-local-podspecs=FirebaseInstanceID.podspec