instanceid.yml 2.9 KB

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