dynamiclinks.yml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. runs-on: macos-12
  20. steps:
  21. - uses: actions/checkout@v3
  22. - uses: ruby/setup-ruby@v1
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: FirebaseDynamicLinks
  26. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec
  27. spm:
  28. # Don't run on private repo unless it is a PR.
  29. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  30. runs-on: macos-12
  31. steps:
  32. - uses: actions/checkout@v3
  33. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  34. with:
  35. cache_key: ${{ matrix.os }}
  36. - name: Initialize xcodebuild
  37. run: scripts/setup_spm_tests.sh
  38. - name: iOS Unit Tests
  39. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseDynamicLinks iOS spmbuildonly
  40. dynamiclinks-cron-only:
  41. # Don't run on private repo.
  42. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  43. runs-on: macos-12
  44. strategy:
  45. matrix:
  46. flags: [
  47. '--use-static-frameworks'
  48. ]
  49. needs: pod_lib_lint
  50. steps:
  51. - uses: actions/checkout@v3
  52. - uses: ruby/setup-ruby@v1
  53. - name: Setup Bundler
  54. run: scripts/setup_bundler.sh
  55. - name: PodLibLint Storage Cron
  56. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --platforms=ios ${{ matrix.flags }}
  57. quickstart:
  58. # Don't run on private repo unless it is a PR.
  59. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  60. env:
  61. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  62. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  63. runs-on: macos-12
  64. steps:
  65. - uses: actions/checkout@v3
  66. - uses: actions/checkout@v3
  67. - uses: ruby/setup-ruby@v1
  68. - name: Setup quickstart
  69. run: scripts/setup_quickstart.sh DynamicLinks
  70. - name: Install Secret GoogleService-Info.plist
  71. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  72. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  73. - name: Update Environment Variable For DynamicLinks
  74. run: |
  75. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  76. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  77. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  78. - name: Test objc quickstart
  79. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true)
  80. - name: Test swift quickstart
  81. if: ${{ always() }}
  82. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true swift)