dynamiclinks.yml 3.8 KB

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