core.yml 2.7 KB

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