installations.yml 5.3 KB

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