core.yml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. strategy:
  19. matrix:
  20. # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  21. target: [ios, tvos, macos --skip-tests]
  22. os: [macos-12, macos-13]
  23. include:
  24. - os: macos-12
  25. xcode: Xcode_14.2
  26. - os: macos-13
  27. xcode: Xcode_15.0.1
  28. runs-on: ${{ matrix.os }}
  29. steps:
  30. - uses: actions/checkout@v3
  31. - uses: ruby/setup-ruby@v1
  32. - name: Setup Bundler
  33. run: scripts/setup_bundler.sh
  34. - name: Build and test
  35. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }}
  36. spm:
  37. # Don't run on private repo unless it is a PR.
  38. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  39. strategy:
  40. matrix:
  41. target: [iOS, tvOS, macOS, catalyst, watchOS]
  42. os: [macos-12, macos-13]
  43. include:
  44. - os: macos-12
  45. xcode: Xcode_14.2
  46. - os: macos-13
  47. xcode: Xcode_15.0.1
  48. runs-on: ${{ matrix.os }}
  49. steps:
  50. - uses: actions/checkout@v3
  51. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  52. with:
  53. cache_key: ${{ matrix.os }}
  54. - name: Initialize xcodebuild
  55. run: scripts/setup_spm_tests.sh
  56. - name: Unit Tests
  57. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  58. catalyst:
  59. # Don't run on private repo unless it is a PR.
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. runs-on: macos-13
  62. steps:
  63. - uses: actions/checkout@v3
  64. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  65. with:
  66. cache_key: ${{ matrix.os }}
  67. - uses: ruby/setup-ruby@v1
  68. - name: Setup Bundler
  69. run: scripts/setup_bundler.sh
  70. - name: Setup project and Build Catalyst
  71. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  72. core-cron-only:
  73. # Don't run on private repo.
  74. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  75. runs-on: macos-13
  76. strategy:
  77. matrix:
  78. target: [ios, tvos, macos]
  79. flags: [
  80. '--use-static-frameworks'
  81. ]
  82. needs: pod-lib-lint
  83. steps:
  84. - uses: actions/checkout@v3
  85. - uses: ruby/setup-ruby@v1
  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 }}