core.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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, watchos]
  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.2
  28. runs-on: ${{ matrix.os }}
  29. steps:
  30. - uses: actions/checkout@v4
  31. - uses: ruby/setup-ruby@v1
  32. - name: Setup Bundler
  33. run: scripts/setup_bundler.sh
  34. - name: Xcode
  35. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  36. - name: Build and test
  37. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }}
  38. spm:
  39. # Don't run on private repo unless it is a PR.
  40. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  41. strategy:
  42. matrix:
  43. target: [iOS, tvOS, macOS, catalyst, watchOS]
  44. os: [macos-12, macos-13, macos-14]
  45. include:
  46. - os: macos-12
  47. xcode: Xcode_14.2
  48. - os: macos-13
  49. xcode: Xcode_15.2
  50. - os: macos-14
  51. xcode: Xcode_15.2
  52. - os: macos-14
  53. xcode: Xcode_15.2
  54. target: visionOS
  55. runs-on: ${{ matrix.os }}
  56. steps:
  57. - uses: actions/checkout@v4
  58. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  59. with:
  60. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  61. - name: Xcode
  62. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  63. - name: Initialize xcodebuild
  64. run: scripts/setup_spm_tests.sh
  65. - name: Unit Tests
  66. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  67. catalyst:
  68. # Don't run on private repo unless it is a PR.
  69. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  70. runs-on: macos-13
  71. steps:
  72. - uses: actions/checkout@v4
  73. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  74. with:
  75. cache_key: ${{ matrix.os }}
  76. - uses: ruby/setup-ruby@v1
  77. - name: Setup Bundler
  78. run: scripts/setup_bundler.sh
  79. - name: Setup project and Build Catalyst
  80. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  81. core-cron-only:
  82. # Don't run on private repo.
  83. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  84. runs-on: macos-13
  85. strategy:
  86. matrix:
  87. target: [ios, tvos, macos]
  88. flags: [
  89. '--use-static-frameworks'
  90. ]
  91. needs: pod-lib-lint
  92. steps:
  93. - uses: actions/checkout@v4
  94. - uses: ruby/setup-ruby@v1
  95. - name: Setup Bundler
  96. run: scripts/setup_bundler.sh
  97. - name: PodLibLint Core Cron
  98. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}