installations.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. spm:
  40. # Don't run on private repo unless it is a PR.
  41. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  42. runs-on: macOS-latest
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Xcode 12
  46. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  47. - name: Initialize xcodebuild
  48. run: xcodebuild -list
  49. - name: iOS Unit Tests
  50. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations iOS spmbuildonly
  51. spm-cron:
  52. # Don't run on private repo.
  53. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  54. runs-on: macOS-latest
  55. strategy:
  56. matrix:
  57. target: [tvOS, macOS, catalyst]
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Xcode 12
  61. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  62. - name: Initialize xcodebuild
  63. run: xcodebuild -list
  64. - name: Unit Tests
  65. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  66. # TODO - Catalyst is disabled because `pod gen` does not have a way to get some dependent pods
  67. # from a local path and the Installations podspec requires that FirebaseInstanceID.podspec not be
  68. # the local version.
  69. #
  70. # catalyst:
  71. # runs-on: macOS-latest
  72. # steps:
  73. # - uses: actions/checkout@v2
  74. # - name: Setup Bundler
  75. # run: scripts/setup_bundler.sh
  76. # - name: Setup project and Build for Catalyst
  77. # # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  78. # run: scripts/test_catalyst.sh FirebaseInstallations build FirebaseInstallations-Unit-unit
  79. quickstart:
  80. # Don't run on private repo unless it is a PR.
  81. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  82. runs-on: macOS-latest
  83. steps:
  84. - uses: actions/checkout@v2
  85. - name: Setup quickstart
  86. run: scripts/setup_quickstart.sh installations
  87. - name: Copy mock plist
  88. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  89. - name: Test objc quickstart
  90. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations
  91. - name: Test swift quickstart
  92. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift
  93. installations-cron-only:
  94. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  95. runs-on: macos-latest
  96. env:
  97. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  98. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  99. strategy:
  100. matrix:
  101. target: [ios, tvos, macos]
  102. flags: [
  103. '--use-modular-headers',
  104. '--use-libraries'
  105. ]
  106. needs: pod-lib-lint
  107. steps:
  108. - uses: actions/checkout@v2
  109. - name: Setup Bundler
  110. run: scripts/setup_bundler.sh
  111. - name: Install GoogleService-Info.plist
  112. run: |
  113. mkdir -p FirebaseInstallations/Source/Tests/Resources
  114. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  115. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  116. - name: Get boolean for secrets available
  117. id: secrets
  118. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  119. - name: PodLibLint Installations Cron
  120. run: |
  121. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  122. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  123. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  124. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  125. --ignore-local-podspecs=FirebaseInstanceID.podspec