sessions.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. - name: Build and test
  40. run: |
  41. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec \
  42. --platforms=${{ matrix.target }} ${{ matrix.tests }}
  43. spm:
  44. # Don't run on private repo unless it is a PR.
  45. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  46. strategy:
  47. matrix:
  48. target: [iOS, tvOS, macOS, catalyst, watchOS]
  49. os: [macos-13, macos-14]
  50. include:
  51. - os: macos-13
  52. xcode: Xcode_15.2
  53. - os: macos-14
  54. xcode: Xcode_15.3
  55. - os: macos-14
  56. xcode: Xcode_15.3
  57. target: visionOS
  58. runs-on: ${{ matrix.os }}
  59. steps:
  60. - uses: actions/checkout@v4
  61. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  62. with:
  63. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  64. - name: Xcode
  65. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  66. - name: Initialize xcodebuild
  67. run: scripts/setup_spm_tests.sh
  68. - name: Unit Tests
  69. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSessionsUnit ${{ matrix.target }} spm
  70. catalyst:
  71. # Don't run on private repo unless it is a PR.
  72. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  73. runs-on: macos-14
  74. steps:
  75. - uses: actions/checkout@v4
  76. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  77. with:
  78. cache_key: catalyst${{ matrix.os }}
  79. - uses: ruby/setup-ruby@v1
  80. - name: Setup Bundler
  81. run: scripts/setup_bundler.sh
  82. - name: Setup project and Build for Catalyst
  83. run: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit