core.yml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. steps:
  31. - uses: actions/checkout@v2
  32. - name: Initialize xcodebuild
  33. run: scripts/setup_spm_tests.sh
  34. - name: iOS Unit Tests
  35. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit iOS spm
  36. spm-cron:
  37. # Don't run on private repo.
  38. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  39. runs-on: macos-11
  40. strategy:
  41. matrix:
  42. target: [tvOS, macOS, catalyst]
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Initialize xcodebuild
  46. run: scripts/setup_spm_tests.sh
  47. - name: Unit Tests
  48. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  49. catalyst:
  50. # Don't run on private repo unless it is a PR.
  51. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  52. runs-on: macos-11
  53. steps:
  54. - uses: actions/checkout@v2
  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-11
  63. strategy:
  64. matrix:
  65. target: [ios, tvos, macos]
  66. flags: [
  67. '--use-static-frameworks',
  68. # Tests are skipped since the Swift tests need modules.
  69. '--skip-tests --use-libraries'
  70. ]
  71. needs: pod-lib-lint
  72. steps:
  73. - uses: actions/checkout@v2
  74. - name: Setup Bundler
  75. run: scripts/setup_bundler.sh
  76. - name: PodLibLint Core Cron
  77. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  78. podspec-presubmit:
  79. # Don't run on private repo unless it is a PR.
  80. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  81. runs-on: macos-11
  82. steps:
  83. - uses: actions/checkout@v2
  84. - name: Setup Bundler
  85. run: scripts/setup_bundler.sh
  86. - name: Build and test
  87. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseCore.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'