core.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  33. with:
  34. cache_key: ${{ matrix.os }}
  35. - name: Initialize xcodebuild
  36. run: scripts/setup_spm_tests.sh
  37. - name: iOS Unit Tests
  38. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit iOS spm
  39. spm-cron:
  40. # Don't run on private repo.
  41. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  42. runs-on: macos-11
  43. strategy:
  44. matrix:
  45. target: [tvOS, macOS, catalyst]
  46. steps:
  47. - uses: actions/checkout@v2
  48. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  49. with:
  50. cache_key: ${{ matrix.os }}
  51. - name: Initialize xcodebuild
  52. run: scripts/setup_spm_tests.sh
  53. - name: Unit Tests
  54. run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm
  55. catalyst:
  56. # Don't run on private repo unless it is a PR.
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. runs-on: macos-11
  59. steps:
  60. - uses: actions/checkout@v2
  61. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  62. with:
  63. cache_key: ${{ matrix.os }}
  64. - name: Setup Bundler
  65. run: scripts/setup_bundler.sh
  66. - name: Setup project and Build Catalyst
  67. run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit
  68. core-cron-only:
  69. # Don't run on private repo.
  70. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  71. runs-on: macos-11
  72. strategy:
  73. matrix:
  74. target: [ios, tvos, macos]
  75. flags: [
  76. '--use-static-frameworks',
  77. # Tests are skipped since the Swift tests need modules.
  78. '--skip-tests --use-libraries'
  79. ]
  80. needs: pod-lib-lint
  81. steps:
  82. - uses: actions/checkout@v2
  83. - name: Setup Bundler
  84. run: scripts/setup_bundler.sh
  85. - name: PodLibLint Core Cron
  86. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  87. podspec-presubmit:
  88. # Don't run on private repo unless it is a PR.
  89. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  90. runs-on: macos-11
  91. steps:
  92. - uses: actions/checkout@v2
  93. - name: Setup Bundler
  94. run: scripts/setup_bundler.sh
  95. - name: Build and test
  96. 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/'