sessions.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. name: sessions
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseSessions**'
  6. - 'FirebaseSessions.podspec'
  7. - '.github/workflows/sessions.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 9am (PST) - cron uses UTC times
  11. - cron: '0 1 * * *'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod-lib-lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. strategy:
  20. matrix:
  21. target: [ios, tvos, macos, watchos]
  22. os: [macos-14, macos-13]
  23. include:
  24. - os: macos-14
  25. xcode: Xcode_15.3
  26. tests:
  27. # Flaky tests on CI
  28. - os: macos-13
  29. xcode: Xcode_15.2
  30. tests: --skip-tests
  31. runs-on: ${{ matrix.os }}
  32. steps:
  33. - uses: actions/checkout@v4
  34. - uses: ruby/setup-ruby@v1
  35. - name: Setup Bundler
  36. run: scripts/setup_bundler.sh
  37. - name: Xcode
  38. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  39. - uses: nick-fields/retry@v3
  40. with:
  41. timeout_minutes: 120
  42. max_attempts: 3
  43. retry_on: error
  44. retry_wait_seconds: 120
  45. command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }}
  46. spm:
  47. # Don't run on private repo unless it is a PR.
  48. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  49. strategy:
  50. matrix:
  51. target: [iOS, tvOS, macOS, catalyst, watchOS]
  52. os: [macos-13, macos-14]
  53. include:
  54. - os: macos-13
  55. xcode: Xcode_15.2
  56. - os: macos-14
  57. xcode: Xcode_15.3
  58. - os: macos-14
  59. xcode: Xcode_15.3
  60. target: visionOS
  61. runs-on: ${{ matrix.os }}
  62. steps:
  63. - uses: actions/checkout@v4
  64. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  65. with:
  66. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  67. - name: Xcode
  68. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  69. - name: Initialize xcodebuild
  70. run: scripts/setup_spm_tests.sh
  71. - uses: nick-fields/retry@v3
  72. with:
  73. timeout_minutes: 120
  74. max_attempts: 3
  75. retry_on: error
  76. retry_wait_seconds: 120
  77. command: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSessionsUnit ${{ matrix.target }} spm
  78. catalyst:
  79. # Don't run on private repo unless it is a PR.
  80. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  81. runs-on: macos-14
  82. steps:
  83. - uses: actions/checkout@v4
  84. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  85. with:
  86. cache_key: catalyst${{ matrix.os }}
  87. - uses: ruby/setup-ruby@v1
  88. - name: Setup Bundler
  89. run: scripts/setup_bundler.sh
  90. - uses: nick-fields/retry@v3
  91. with:
  92. timeout_minutes: 120
  93. max_attempts: 3
  94. retry_on: error
  95. retry_wait_seconds: 120
  96. command: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit