instanceid.yml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 10pm (PST) - cron uses UTC times
  12. - cron: '0 6 * * *'
  13. jobs:
  14. pod-lib-lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || 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 == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || 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. run: scripts/test_catalyst.sh FirebaseInstanceID test FirebaseInstanceID-Unit-unit
  49. instanceid-cron-only:
  50. # Don't run on private repo.
  51. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  52. runs-on: macos-latest
  53. env:
  54. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  55. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  56. strategy:
  57. matrix:
  58. target: [ios, tvos, macos]
  59. flags: [
  60. '--use-static-frameworks',
  61. '--use-libraries'
  62. ]
  63. needs: pod-lib-lint
  64. steps:
  65. - uses: actions/checkout@v2
  66. - name: Setup Bundler
  67. run: scripts/setup_bundler.sh
  68. - name: Install GoogleService-Info.plist
  69. run: |
  70. mkdir -p Example/InstanceID/Resources
  71. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  72. Example/InstanceID/Resources/GoogleService-Info.plist "$plist_secret"
  73. - name: Get boolean for secrets available
  74. id: secrets
  75. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  76. - name: PodLibLint InstanceID Cron
  77. run: |
  78. export FIR_IID_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  79. 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 }}