core-diagnostics.yml 2.7 KB

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