core.yml 3.4 KB

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