dynamiclinks.yml 6.8 KB

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