dynamiclinks.yml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. name: dynamiclinks
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseDynamicLinks**'
  6. - '.github/workflows/dynamiclinks.yml'
  7. - 'Interop/Analytics/Public/*.h'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 1am (PST) - cron uses UTC times
  11. - cron: '0 9 * * *'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod_lib_lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. strategy:
  20. matrix:
  21. os: [macos-14]
  22. xcode: [Xcode_15.2, Xcode_16]
  23. runs-on: ${{ matrix.os }}
  24. steps:
  25. - uses: actions/checkout@v4
  26. - uses: ruby/setup-ruby@v1
  27. - name: Setup Bundler
  28. run: scripts/setup_bundler.sh
  29. - name: Xcode
  30. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  31. - name: FirebaseDynamicLinks
  32. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --allow-warnings
  33. spm-package-resolved:
  34. env:
  35. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  36. runs-on: macos-14
  37. outputs:
  38. cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  39. steps:
  40. - uses: actions/checkout@v4
  41. - name: Generate Swift Package.resolved
  42. id: swift_package_resolve
  43. run: |
  44. swift package resolve
  45. - name: Generate cache key
  46. id: generate_cache_key
  47. run: |
  48. cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  49. echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  50. - uses: actions/cache/save@v4
  51. id: cache
  52. with:
  53. path: .build
  54. key: ${{ steps.generate_cache_key.outputs.cache_key }}
  55. spm:
  56. # Don't run on private repo unless it is a PR.
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. needs: [spm-package-resolved]
  59. strategy:
  60. matrix:
  61. include:
  62. - os: macos-13
  63. xcode: Xcode_15.2
  64. - os: macos-14
  65. xcode: Xcode_15.4
  66. - os: macos-15
  67. xcode: Xcode_16
  68. runs-on: ${{ matrix.os }}
  69. steps:
  70. - uses: actions/checkout@v4
  71. - uses: actions/cache/restore@v4
  72. with:
  73. path: .build
  74. key: ${{needs.spm-package-resolved.outputs.cache_key}}
  75. - name: Xcode
  76. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  77. - name: Initialize xcodebuild
  78. run: scripts/setup_spm_tests.sh
  79. - name: iOS Unit Tests
  80. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseDynamicLinks iOS spmbuildonly
  81. dynamiclinks-cron-only:
  82. # Don't run on private repo.
  83. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  84. runs-on: macos-14
  85. strategy:
  86. matrix:
  87. flags: [
  88. '--use-static-frameworks'
  89. ]
  90. needs: pod_lib_lint
  91. steps:
  92. - uses: actions/checkout@v4
  93. - uses: ruby/setup-ruby@v1
  94. - name: Setup Bundler
  95. run: scripts/setup_bundler.sh
  96. - name: PodLibLint Storage Cron
  97. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --platforms=ios ${{ matrix.flags }} --allow-warnings
  98. quickstart:
  99. # Don't run on private repo unless it is a PR.
  100. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  101. env:
  102. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  104. runs-on: macos-14
  105. steps:
  106. - uses: actions/checkout@v4
  107. - uses: ruby/setup-ruby@v1
  108. - name: Setup quickstart
  109. run: scripts/setup_quickstart.sh DynamicLinks
  110. - name: Install Secret GoogleService-Info.plist
  111. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  112. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  113. - name: Update Environment Variable For DynamicLinks
  114. run: |
  115. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  116. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  117. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  118. - name: Test objc quickstart
  119. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true)
  120. - name: Test swift quickstart
  121. if: ${{ always() }}
  122. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true swift)
  123. quickstart-ftl-cron-only:
  124. # Don't run on private repo.
  125. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  126. env:
  127. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  128. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  129. runs-on: macos-14
  130. steps:
  131. - uses: actions/checkout@v4
  132. - uses: ruby/setup-ruby@v1
  133. - uses: actions/setup-python@v5
  134. with:
  135. python-version: '3.11'
  136. - name: Setup quickstart
  137. run: scripts/setup_quickstart.sh DynamicLinks
  138. - name: Install Secret GoogleService-Info.plist
  139. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  140. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  141. - name: Update Environment Variable For DynamicLinks
  142. run: |
  143. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  144. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  145. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  146. # - name: Build objc quickstart
  147. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh DynamicLinks)
  148. - name: Build swift quickstart
  149. if: ${{ always() }}
  150. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh DynamicLinks swift)
  151. - id: ftl_test
  152. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  153. with:
  154. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  155. testapp_dir: quickstart-ios/build-for-testing
  156. test_type: "xctest"