installations.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 10pm (PST) - cron uses UTC times
  10. - cron: '0 6 * * *'
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  13. cancel-in-progress: true
  14. jobs:
  15. pod-lib-lint:
  16. # Don't run on private repo unless it is a PR.
  17. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  18. runs-on: macos-12
  19. env:
  20. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  21. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  22. POD_LIB_LINT_ONLY: 1
  23. strategy:
  24. matrix:
  25. target: [ios, tvos, macos]
  26. steps:
  27. - uses: actions/checkout@v2
  28. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  29. with:
  30. ruby-version: '2.7'
  31. - name: Setup Bundler
  32. run: scripts/setup_bundler.sh
  33. - name: Configure test keychain
  34. run: scripts/configure_test_keychain.sh
  35. - name: Install GoogleService-Info.plist
  36. run: |
  37. mkdir -p FirebaseInstallations/Source/Tests/Resources
  38. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  39. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  40. - name: Get boolean for secrets available
  41. id: secrets
  42. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  43. - name: Build and test
  44. run: |
  45. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  46. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  47. --platforms=${{ matrix.target }}
  48. spm:
  49. # Don't run on private repo unless it is a PR.
  50. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  51. runs-on: macos-12
  52. strategy:
  53. matrix:
  54. target: [iOS, tvOS, macOS, catalyst, watchOS]
  55. steps:
  56. - uses: actions/checkout@v2
  57. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  58. with:
  59. cache_key: ${{ matrix.os }}
  60. - name: Initialize xcodebuild
  61. run: scripts/setup_spm_tests.sh
  62. - name: Unit Tests
  63. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  64. catalyst:
  65. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  66. runs-on: macos-12
  67. env:
  68. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  69. POD_LIB_LINT_ONLY: 1
  70. steps:
  71. - uses: actions/checkout@v2
  72. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  73. with:
  74. cache_key: ${{ matrix.os }}
  75. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  76. with:
  77. ruby-version: '2.7'
  78. - name: Setup Bundler
  79. run: scripts/setup_bundler.sh
  80. - name: Setup project and Build for Catalyst
  81. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  82. quickstart:
  83. # Don't run on private repo unless it is a PR.
  84. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  85. runs-on: macos-12
  86. steps:
  87. - uses: actions/checkout@v2
  88. - uses: actions/checkout@v2
  89. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  90. with:
  91. ruby-version: '2.7'
  92. - name: Setup quickstart
  93. run: scripts/setup_quickstart.sh installations
  94. - name: Copy mock plist
  95. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  96. - name: Test objc quickstart
  97. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  98. - name: Test swift quickstart
  99. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  100. installations-cron-only:
  101. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  102. runs-on: macos-12
  103. env:
  104. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  105. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  106. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  107. POD_LIB_LINT_ONLY: 1
  108. strategy:
  109. matrix:
  110. target: [ios, tvos, macos]
  111. flags: [
  112. '--use-static-frameworks'
  113. ]
  114. needs: pod-lib-lint
  115. steps:
  116. - uses: actions/checkout@v2
  117. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  118. with:
  119. ruby-version: '2.7'
  120. - name: Setup Bundler
  121. run: scripts/setup_bundler.sh
  122. - name: Configure test keychain
  123. run: scripts/configure_test_keychain.sh
  124. - name: Install GoogleService-Info.plist
  125. run: |
  126. mkdir -p FirebaseInstallations/Source/Tests/Resources
  127. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  128. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  129. - name: Get boolean for secrets available
  130. id: secrets
  131. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  132. - name: PodLibLint Installations Cron
  133. run: |
  134. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  135. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  136. --platforms=${{ matrix.target }} ${{ matrix.flags }} \