sessions.yml 2.9 KB

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