installations.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. name: installations
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - 'FirebaseInstallations**'
  7. - '.github/workflows/installations.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 10pm (PST) - cron uses UTC times
  11. - cron: '0 6 * * *'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. spm:
  17. uses: ./.github/workflows/common.yml
  18. with:
  19. target: FirebaseInstallations
  20. buildonly_platforms: all
  21. catalyst:
  22. uses: ./.github/workflows/common_catalyst.yml
  23. with:
  24. product: FirebaseInstallations
  25. target: FirebaseInstallations-Unit-unit
  26. pod-lib-lint:
  27. # Don't run on private repo unless it is a PR.
  28. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  29. env:
  30. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  31. strategy:
  32. matrix:
  33. # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  34. target: [ios, tvos, macos --skip-tests, watchos]
  35. build-env:
  36. - os: macos-14
  37. xcode: Xcode_16.2
  38. test-specs: unit,integration
  39. - os: macos-15
  40. xcode: Xcode_16.3
  41. test-specs: unit
  42. runs-on: ${{ matrix.build-env.os }}
  43. steps:
  44. - uses: actions/checkout@v4
  45. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  46. - name: Setup Bundler
  47. run: scripts/setup_bundler.sh
  48. - name: Configure test keychain
  49. run: scripts/configure_test_keychain.sh
  50. - name: Install GoogleService-Info.plist
  51. run: |
  52. mkdir -p FirebaseInstallations/Source/Tests/Resources
  53. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  54. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  55. - name: Get boolean for secrets available
  56. id: secrets
  57. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  58. - name: Xcode
  59. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  60. - name: Build and test
  61. run: |
  62. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  63. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  64. --platforms=${{ matrix.target }} --test-specs=${{ matrix.build-env.test-specs }}
  65. quickstart:
  66. # Don't run on private repo unless it is a PR.
  67. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  68. runs-on: macos-15
  69. steps:
  70. - uses: actions/checkout@v4
  71. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  72. - name: Xcode
  73. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  74. - name: Setup quickstart
  75. run: scripts/setup_quickstart.sh installations
  76. - name: Copy mock plist
  77. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  78. - name: Test objc quickstart
  79. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  80. - name: Test swift quickstart
  81. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  82. quickstart-ftl-cron-only:
  83. # Don't run on private repo.
  84. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  85. runs-on: macos-15
  86. steps:
  87. - uses: actions/checkout@v4
  88. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  89. - uses: actions/setup-python@v5
  90. with:
  91. python-version: '3.11'
  92. - name: Xcode
  93. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  94. - name: Setup quickstart
  95. run: scripts/setup_quickstart.sh installations
  96. - name: Copy mock plist
  97. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  98. - name: Build objc quickstart
  99. run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations
  100. - name: Build swift quickstart
  101. run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift
  102. - id: ftl_test
  103. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  104. with:
  105. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  106. testapp_dir: quickstart-ios/build-for-testing
  107. test_type: "xctest"
  108. installations-cron-only:
  109. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  110. runs-on: macos-15
  111. env:
  112. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  113. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  114. strategy:
  115. matrix:
  116. target: [ios, tvos, macos]
  117. flags: [
  118. '--use-static-frameworks'
  119. ]
  120. needs: pod-lib-lint
  121. steps:
  122. - uses: actions/checkout@v4
  123. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  124. - name: Xcode
  125. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  126. - name: Setup Bundler
  127. run: scripts/setup_bundler.sh
  128. - name: Configure test keychain
  129. run: scripts/configure_test_keychain.sh
  130. - name: Install GoogleService-Info.plist
  131. run: |
  132. mkdir -p FirebaseInstallations/Source/Tests/Resources
  133. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  134. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  135. - name: Get boolean for secrets available
  136. id: secrets
  137. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  138. - name: PodLibLint Installations Cron
  139. run: |
  140. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  141. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  142. --platforms=${{ matrix.target }} ${{ matrix.flags }} \