dynamiclinks.yml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. os: [macos-14]
  62. xcode: [Xcode_15.2, Xcode_16]
  63. runs-on: ${{ matrix.os }}
  64. steps:
  65. - uses: actions/checkout@v4
  66. - uses: actions/cache/restore@v4
  67. with:
  68. path: .build
  69. key: ${{needs.spm-package-resolved.outputs.cache_key}}
  70. - name: Xcode
  71. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  72. - name: Initialize xcodebuild
  73. run: scripts/setup_spm_tests.sh
  74. - name: iOS Unit Tests
  75. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseDynamicLinks iOS spmbuildonly
  76. dynamiclinks-cron-only:
  77. # Don't run on private repo.
  78. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  79. runs-on: macos-14
  80. strategy:
  81. matrix:
  82. flags: [
  83. '--use-static-frameworks'
  84. ]
  85. needs: pod_lib_lint
  86. steps:
  87. - uses: actions/checkout@v4
  88. - uses: ruby/setup-ruby@v1
  89. - name: Setup Bundler
  90. run: scripts/setup_bundler.sh
  91. - name: PodLibLint Storage Cron
  92. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --platforms=ios ${{ matrix.flags }} --allow-warnings
  93. quickstart:
  94. # Don't run on private repo unless it is a PR.
  95. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  96. env:
  97. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  98. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  99. runs-on: macos-14
  100. steps:
  101. - uses: actions/checkout@v4
  102. - uses: ruby/setup-ruby@v1
  103. - name: Setup quickstart
  104. run: scripts/setup_quickstart.sh DynamicLinks
  105. - name: Install Secret GoogleService-Info.plist
  106. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  107. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  108. - name: Update Environment Variable For DynamicLinks
  109. run: |
  110. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  111. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  112. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  113. - name: Test objc quickstart
  114. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true)
  115. - name: Test swift quickstart
  116. if: ${{ always() }}
  117. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true swift)
  118. quickstart-ftl-cron-only:
  119. # Don't run on private repo.
  120. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  121. env:
  122. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  123. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  124. runs-on: macos-14
  125. steps:
  126. - uses: actions/checkout@v4
  127. - uses: ruby/setup-ruby@v1
  128. - uses: actions/setup-python@v5
  129. with:
  130. python-version: '3.11'
  131. - name: Setup quickstart
  132. run: scripts/setup_quickstart.sh DynamicLinks
  133. - name: Install Secret GoogleService-Info.plist
  134. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  135. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  136. - name: Update Environment Variable For DynamicLinks
  137. run: |
  138. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  139. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  140. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  141. # - name: Build objc quickstart
  142. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh DynamicLinks)
  143. - name: Build swift quickstart
  144. if: ${{ always() }}
  145. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh DynamicLinks swift)
  146. - id: ftl_test
  147. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  148. with:
  149. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  150. testapp_dir: quickstart-ios/build-for-testing
  151. test_type: "xctest"