core.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: core
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseCore**'
  6. - 'Interop/CoreDiagnostics/Public/*.h'
  7. - '.github/workflows/core.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 2am (PST) - cron uses UTC times
  11. - cron: '0 10 * * *'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod-lib-lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. runs-on: macos-11
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos]
  23. env:
  24. POD_LIB_LINT_ONLY: 1
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: Setup Bundler
  28. run: scripts/setup_bundler.sh
  29. - name: Build and test
  30. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }}
  31. spm:
  32. # Don't run on private repo unless it is a PR.
  33. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  34. runs-on: macos-11
  35. strategy:
  36. matrix:
  37. target: [iOS, tvOS, macOS, catalyst, watchOS]
  38. steps:
  39. - uses: actions/checkout@v2
  40. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  41. with:
  42. cache_key: ${{ matrix.os }}
  43. - name: Initialize xcodebuild
  44. run: scripts/setup_spm_tests.sh
  45. - name: Unit Tests
  46. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  47. catalyst:
  48. # Don't run on private repo unless it is a PR.
  49. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  50. runs-on: macos-11
  51. env:
  52. POD_LIB_LINT_ONLY: 1
  53. steps:
  54. - uses: actions/checkout@v2
  55. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  56. with:
  57. cache_key: ${{ matrix.os }}
  58. - name: Setup Bundler
  59. run: scripts/setup_bundler.sh
  60. - name: Setup project and Build Catalyst
  61. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  62. core-cron-only:
  63. # Don't run on private repo.
  64. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  65. runs-on: macos-11
  66. strategy:
  67. matrix:
  68. target: [ios, tvos, macos]
  69. flags: [
  70. '--use-static-frameworks'
  71. ]
  72. needs: pod-lib-lint
  73. steps:
  74. - uses: actions/checkout@v2
  75. - name: Setup Bundler
  76. run: scripts/setup_bundler.sh
  77. - name: PodLibLint Core Cron
  78. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}