core.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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-11
  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. - 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-11
  36. strategy:
  37. matrix:
  38. target: [iOS, tvOS, macOS, catalyst, watchOS]
  39. steps:
  40. - uses: actions/checkout@v2
  41. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  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-11
  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@v2
  57. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  58. with:
  59. cache_key: ${{ matrix.os }}
  60. - name: Setup Bundler
  61. run: scripts/setup_bundler.sh
  62. - name: Setup project and Build Catalyst
  63. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  64. core-cron-only:
  65. # Don't run on private repo.
  66. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  67. runs-on: macos-11
  68. strategy:
  69. matrix:
  70. target: [ios, tvos, macos]
  71. flags: [
  72. '--use-static-frameworks'
  73. ]
  74. needs: pod-lib-lint
  75. steps:
  76. - uses: actions/checkout@v2
  77. - name: Setup Bundler
  78. run: scripts/setup_bundler.sh
  79. - name: PodLibLint Core Cron
  80. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}