core.yml 3.3 KB

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