common_cocoapods_cron.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. name: common_cocoapods_cron
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_call:
  6. secrets:
  7. plist_secret:
  8. required: false
  9. inputs:
  10. # The product to test be tested (e.g. `FirebaseABTesting`).
  11. product:
  12. type: string
  13. required: true
  14. # JSON array of platforms to test against (e.g. `[ "ios", "tvos" ]`).
  15. platforms:
  16. type: string
  17. required: true
  18. # JSON array of flags to pass to pod lib lint. Each string in the array
  19. # will create a separate matrix entry.
  20. # e.g. `[ "--use-static-frameworks" ]`.
  21. # To run with no flags, pass `[ "" ]`.
  22. flags:
  23. type: string
  24. required: false
  25. default: '[""]'
  26. # A command to execute before testing.
  27. setup_command:
  28. type: string
  29. required: false
  30. default: ""
  31. # The version of Xcode to use.
  32. xcode:
  33. type: string
  34. required: false
  35. default: "Xcode_16.4"
  36. # The runner to use.
  37. runs_on:
  38. type: string
  39. required: false
  40. default: "macos-15"
  41. # Whether to ignore deprecation warnings by setting FIREBASE_CI.
  42. ignore_deprecation_warnings:
  43. type: boolean
  44. required: false
  45. default: false
  46. jobs:
  47. cron-job:
  48. if: |
  49. github.repository == 'firebase/firebase-ios-sdk' &&
  50. (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
  51. runs-on: ${{ inputs.runs_on }}
  52. strategy:
  53. matrix:
  54. platform: ${{ fromJson(inputs.platforms) }}
  55. flags: ${{ fromJson(inputs.flags) }}
  56. steps:
  57. - uses: actions/checkout@v4
  58. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  59. - name: Setup Bundler
  60. run: scripts/setup_bundler.sh
  61. - name: Xcode
  62. run: sudo xcode-select -s /Applications/${{ inputs.xcode }}.app/Contents/Developer
  63. - name: Set FIREBASE_CI, if needed.
  64. if: inputs.ignore_deprecation_warnings == true
  65. run: echo "FIREBASE_CI=true" >> $GITHUB_ENV
  66. - name: Run setup command, if needed.
  67. if: inputs.setup_command != ''
  68. env:
  69. plist_secret: ${{ secrets.plist_secret }}
  70. run: ${{ inputs.setup_command }}
  71. - name: PodLibLint Cron
  72. uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  73. with:
  74. timeout_minutes: 15
  75. max_attempts: 3
  76. retry_wait_seconds: 120
  77. command: |
  78. scripts/pod_lib_lint.rb \
  79. ${{ inputs.product }}.podspec \
  80. --platforms=${{ matrix.platform }} \
  81. ${{ matrix.flags }}