core.yml 2.7 KB

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