core.yml 2.7 KB

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