core.yml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod-lib-lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. runs-on: macos-12
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos]
  23. env:
  24. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  25. POD_LIB_LINT_ONLY: 1
  26. steps:
  27. - uses: actions/checkout@v2
  28. - uses: ruby/setup-ruby@v1
  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 FirebaseCore.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. strategy:
  38. matrix:
  39. target: [iOS, tvOS, macOS, catalyst, watchOS]
  40. steps:
  41. - uses: actions/checkout@v2
  42. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  43. with:
  44. cache_key: ${{ matrix.os }}
  45. - name: Initialize xcodebuild
  46. run: scripts/setup_spm_tests.sh
  47. - name: Unit Tests
  48. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  49. catalyst:
  50. # Don't run on private repo unless it is a PR.
  51. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  52. runs-on: macos-12
  53. env:
  54. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  55. POD_LIB_LINT_ONLY: 1
  56. steps:
  57. - uses: actions/checkout@v2
  58. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  59. with:
  60. cache_key: ${{ matrix.os }}
  61. - uses: ruby/setup-ruby@v1
  62. - name: Setup Bundler
  63. run: scripts/setup_bundler.sh
  64. - name: Setup project and Build Catalyst
  65. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  66. core-cron-only:
  67. # Don't run on private repo.
  68. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  69. runs-on: macos-12
  70. strategy:
  71. matrix:
  72. target: [ios, tvos, macos]
  73. flags: [
  74. '--use-static-frameworks'
  75. ]
  76. needs: pod-lib-lint
  77. steps:
  78. - uses: actions/checkout@v2
  79. - uses: ruby/setup-ruby@v1
  80. - name: Setup Bundler
  81. run: scripts/setup_bundler.sh
  82. - name: PodLibLint Core Cron
  83. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}