core.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 8pm (PST) - cron uses UTC times
  11. - cron: '0 4 * * *'
  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-latest
  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-latest
  30. steps:
  31. - uses: actions/checkout@v2
  32. - name: Xcode 12
  33. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  34. - name: Initialize xcodebuild
  35. run: xcodebuild -list
  36. - name: iOS Unit Tests
  37. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit iOS spm
  38. spm-cron:
  39. # Don't run on private repo.
  40. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  41. runs-on: macOS-latest
  42. strategy:
  43. matrix:
  44. target: [tvOS, macOS, catalyst]
  45. steps:
  46. - uses: actions/checkout@v2
  47. - name: Xcode 12
  48. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  49. - name: Initialize xcodebuild
  50. run: xcodebuild -list
  51. - name: Unit Tests
  52. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  53. catalyst:
  54. # Don't run on private repo unless it is a PR.
  55. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  56. runs-on: macOS-latest
  57. steps:
  58. - uses: actions/checkout@v2
  59. - name: Setup Bundler
  60. run: scripts/setup_bundler.sh
  61. - name: Setup project and Build Catalyst
  62. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  63. core-cron-only:
  64. # Don't run on private repo.
  65. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  66. runs-on: macos-latest
  67. strategy:
  68. matrix:
  69. target: [ios, tvos, macos]
  70. flags: [
  71. '--use-static-frameworks',
  72. # Tests are skipped since the Swift tests need modules.
  73. '--skip-tests --use-libraries'
  74. ]
  75. needs: pod-lib-lint
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Setup Bundler
  79. run: scripts/setup_bundler.sh
  80. - name: PodLibLint Core Cron
  81. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}