sessions.yml 3.1 KB

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