common_catalyst.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: common_catalyst
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_call:
  6. inputs:
  7. # The product to test be tested (e.g. `FirebaseABTesting`).
  8. product:
  9. type: string
  10. required: true
  11. # The target scheme to be tested (e.g. `FirebaseABTesting-Unit-unit`.
  12. target:
  13. type: string
  14. required: true
  15. # Whether to build-only. Defaults to false.
  16. buildonly:
  17. type: boolean
  18. required: false
  19. default: false
  20. jobs:
  21. # TODO: Can this be built via SPM?
  22. catalyst:
  23. # Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
  24. if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
  25. runs-on: macos-15
  26. steps:
  27. - uses: actions/checkout@v4
  28. # TODO: Remove in favor of ccache.
  29. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  30. with:
  31. cache_key: catalyst${{ matrix.os }}
  32. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  33. - name: Setup Bundler
  34. run: scripts/setup_bundler.sh
  35. - name: Xcode
  36. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  37. - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  38. with:
  39. timeout_minutes: 120
  40. max_attempts: 3
  41. retry_on: error
  42. retry_wait_seconds: 120
  43. command: |
  44. scripts/test_catalyst.sh \
  45. ${{ inputs.product }} \
  46. ${{ inputs.buildonly == true && 'build' || 'test' }} \
  47. ${{ inputs.target }}