core.yml 3.5 KB

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