core.yml 3.0 KB

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