instanceid.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: instanceid
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInstanceID**'
  6. - 'Firebase/InstanceID/**'
  7. - 'Example/InstanceID/**'
  8. - '.github/workflows/instanceid.yml'
  9. - 'Gemfile'
  10. schedule:
  11. # Run every day at 11pm (PST) - cron uses UTC times
  12. - cron: '0 7 * * *'
  13. jobs:
  14. pod-lib-lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  17. runs-on: macOS-latest
  18. env:
  19. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Install GoogleService-Info.plist
  28. run: |
  29. mkdir -p Example/InstanceID/Resources
  30. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  31. Example/InstanceID/Resources/GoogleService-Info.plist "$plist_secret"
  32. - name: Get boolean for secrets available
  33. id: secrets
  34. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  35. - name: Build and test
  36. run: |
  37. export FIR_IID_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  38. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=${{ matrix.target }}
  39. catalyst:
  40. # Don't run on private repo unless it is a PR.
  41. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  42. runs-on: macOS-latest
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Setup project and Build for Catalyst
  48. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  49. run: scripts/test_catalyst.sh FirebaseInstanceID build FirebaseInstanceID-Unit-unit
  50. instanceid-cron-only:
  51. # Don't run on private repo.
  52. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  53. runs-on: macos-latest
  54. env:
  55. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  56. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  57. strategy:
  58. matrix:
  59. target: [ios, tvos, macos]
  60. flags: [
  61. '--use-modular-headers',
  62. '--use-libraries'
  63. ]
  64. needs: pod-lib-lint
  65. steps:
  66. - uses: actions/checkout@v2
  67. - name: Setup Bundler
  68. run: scripts/setup_bundler.sh
  69. - name: Install GoogleService-Info.plist
  70. run: |
  71. mkdir -p Example/InstanceID/Resources
  72. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  73. Example/InstanceID/Resources/GoogleService-Info.plist "$plist_secret"
  74. - name: Get boolean for secrets available
  75. id: secrets
  76. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  77. - name: PodLibLint InstanceID Cron
  78. run: |
  79. export FIR_IID_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  80. FIR_IID_INTEGRATION_TESTS_REQUIRED="$plist_secret" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstanceID.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}