core-diagnostics.yml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 2am (PST) - cron uses UTC times
  12. - cron: '0 10 * * *'
  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-11
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Build and test
  26. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=${{ matrix.target }}
  27. spm:
  28. # Don't run on private repo unless it is a PR.
  29. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  30. runs-on: macos-11
  31. steps:
  32. - uses: actions/checkout@v2
  33. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  34. with:
  35. cache_key: ${{ matrix.os }}
  36. - name: Initialize xcodebuild
  37. run: scripts/setup_spm_tests.sh
  38. - name: iOS Unit Tests
  39. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit iOS spm
  40. catalyst:
  41. # Don't run on private repo unless it is a PR.
  42. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  43. runs-on: macos-11
  44. steps:
  45. - uses: actions/checkout@v2
  46. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  47. with:
  48. cache_key: ${{ matrix.os }}
  49. - name: Setup Bundler
  50. run: scripts/setup_bundler.sh
  51. - name: Setup project and Build Catalyst
  52. run: scripts/test_catalyst.sh FirebaseCoreDiagnostics test FirebaseCoreDiagnostics-Unit-unit
  53. corediagnostics-cron-only:
  54. # Don't run on private repo.
  55. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  56. runs-on: macos-11
  57. strategy:
  58. matrix:
  59. target: [ios, tvos, macos]
  60. flags: [
  61. '--use-static-frameworks',
  62. '--use-libraries'
  63. ]
  64. needs: pod-lib-lint
  65. steps:
  66. - uses: actions/checkout@v2
  67. - name: Setup Bundler
  68. run: scripts/setup_bundler.sh
  69. - name: PodLibLint CoreDiagnostics Cron
  70. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}