core.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 xcodebuild -scheme CoreUnit test -sdk
  38. iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' | xcpretty
  39. spm-cron:
  40. # Don't run on private repo.
  41. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  42. runs-on: macOS-latest
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Xcode 12
  46. run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
  47. - name: Initialize xcodebuild
  48. run: xcodebuild -list
  49. - name: macOS Unit Tests
  50. run: scripts/third_party/travis/retry.sh xcodebuild -scheme CoreUnit test | xcpretty
  51. - name: tvOS Unit Tests
  52. run: scripts/third_party/travis/retry.sh xcodebuild -scheme CoreUnit test -sdk
  53. appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
  54. catalyst:
  55. # Don't run on private repo unless it is a PR.
  56. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  57. runs-on: macOS-latest
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Setup Bundler
  61. run: scripts/setup_bundler.sh
  62. - name: Setup project and Build Catalyst
  63. run: scripts/test_catalyst.sh FirebaseCore build
  64. core-cron-only:
  65. # Don't run on private repo.
  66. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  67. runs-on: macos-latest
  68. strategy:
  69. matrix:
  70. target: [ios, tvos, macos]
  71. flags: [
  72. '--use-modular-headers',
  73. # Tests are skipped since the Swift tests need modules.
  74. '--skip-tests --use-libraries'
  75. ]
  76. needs: pod-lib-lint
  77. steps:
  78. - uses: actions/checkout@v2
  79. - name: Setup Bundler
  80. run: scripts/setup_bundler.sh
  81. - name: PodLibLint Core Cron
  82. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}