core.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 11pm (PST) - cron uses UTC times
  11. - cron: '0 7 * * *'
  12. jobs:
  13. pod-lib-lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || 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 != 'FirebasePrivate/firebase-ios-sdk' || 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_beta.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 != 'FirebasePrivate/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_beta.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 != 'FirebasePrivate/firebase-ios-sdk' || 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 build
  63. archive-cron:
  64. # Don't run on private repo.
  65. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  66. runs-on: macOS-latest
  67. strategy:
  68. matrix:
  69. target: [ios, tvos, macos]
  70. steps:
  71. - uses: actions/checkout@v2
  72. - name: Setup Bundler
  73. run: scripts/setup_bundler.sh
  74. - name: Setup project and archive
  75. run: scripts/test_archiving.sh FirebaseCore ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive
  76. core-cron-only:
  77. # Don't run on private repo.
  78. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  79. runs-on: macos-latest
  80. strategy:
  81. matrix:
  82. target: [ios, tvos, macos]
  83. flags: [
  84. '--use-static-frameworks',
  85. # Tests are skipped since the Swift tests need modules.
  86. '--skip-tests --use-libraries'
  87. ]
  88. needs: pod-lib-lint
  89. steps:
  90. - uses: actions/checkout@v2
  91. - name: Setup Bundler
  92. run: scripts/setup_bundler.sh
  93. - name: PodLibLint Core Cron
  94. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}