core-diagnostics.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: core-diagnostics
  2. on:
  3. pull_request:
  4. paths:
  5. - 'Firebase/CoreDiagnostics/**'
  6. - 'Example/CoreDiagnostics/**'
  7. - 'Interop/CoreDiagnostics/Public/*.h'
  8. - '.github/workflows/core-diagnostics.yml'
  9. - 'Gemfile*'
  10. schedule:
  11. # Run every day at 12am (PST) - cron uses UTC times
  12. - cron: '0 8 * * *'
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. pod-lib-lint:
  18. # Don't run on private repo unless it is a PR.
  19. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  20. runs-on: macos-12
  21. strategy:
  22. matrix:
  23. target: [ios, tvos, macos]
  24. steps:
  25. - uses: actions/checkout@v2
  26. - uses: ruby/setup-ruby@v1
  27. - name: Setup Bundler
  28. run: scripts/setup_bundler.sh
  29. - name: Build and test
  30. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=${{ matrix.target }}
  31. spm:
  32. # Don't run on private repo unless it is a PR.
  33. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  34. runs-on: macos-12
  35. steps:
  36. - uses: actions/checkout@v2
  37. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  38. with:
  39. cache_key: ${{ matrix.os }}
  40. - name: Initialize xcodebuild
  41. run: scripts/setup_spm_tests.sh
  42. - name: iOS Unit Tests
  43. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit iOS spm
  44. catalyst:
  45. # Don't run on private repo unless it is a PR.
  46. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  47. runs-on: macos-12
  48. steps:
  49. - uses: actions/checkout@v2
  50. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  51. with:
  52. cache_key: ${{ matrix.os }}
  53. - uses: ruby/setup-ruby@v1
  54. - name: Setup Bundler
  55. run: scripts/setup_bundler.sh
  56. - name: Setup project and Build Catalyst
  57. run: scripts/test_catalyst.sh FirebaseCoreDiagnostics test FirebaseCoreDiagnostics-Unit-unit
  58. corediagnostics-cron-only:
  59. # Don't run on private repo.
  60. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  61. runs-on: macos-12
  62. strategy:
  63. matrix:
  64. target: [ios, tvos, macos]
  65. flags: [
  66. '--use-static-frameworks'
  67. ]
  68. needs: pod-lib-lint
  69. steps:
  70. - uses: actions/checkout@v2
  71. - uses: ruby/setup-ruby@v1
  72. - name: Setup Bundler
  73. run: scripts/setup_bundler.sh
  74. - name: PodLibLint CoreDiagnostics Cron
  75. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}