core-diagnostics.yml 3.1 KB

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