shared-swift.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: shared-swift
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseSharedSwift**'
  6. - '.github/workflows/shared-swift.yml'
  7. - 'Gemfile*'
  8. schedule:
  9. # Run every day at 3am (PST) - cron uses UTC times
  10. - cron: '0 11 * * *'
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  13. cancel-in-progress: true
  14. jobs:
  15. pod-lib-lint:
  16. # Don't run on private repo unless it is a PR.
  17. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos, watchos]
  21. os: [macos-14, macos-13]
  22. include:
  23. - os: macos-14
  24. xcode: Xcode_15.3
  25. - os: macos-13
  26. xcode: Xcode_15.2
  27. runs-on: ${{ matrix.os }}
  28. steps:
  29. - uses: actions/checkout@v4
  30. - uses: ruby/setup-ruby@v1
  31. - name: Setup Bundler
  32. run: scripts/setup_bundler.sh
  33. - name: Xcode
  34. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  35. - name: Build and test
  36. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }}
  37. spm:
  38. # Don't run on private repo unless it is a PR.
  39. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  40. strategy:
  41. matrix:
  42. target: [iOS, tvOS, macOS, catalyst, watchOS]
  43. os: [macos-13, macos-14]
  44. include:
  45. - os: macos-13
  46. xcode: Xcode_15.2
  47. - os: macos-14
  48. xcode: Xcode_15.3
  49. - os: macos-14
  50. xcode: Xcode_15.3
  51. target: visionOS
  52. runs-on: ${{ matrix.os }}
  53. steps:
  54. - uses: actions/checkout@v4
  55. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  56. with:
  57. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  58. - name: Xcode
  59. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  60. - name: Initialize xcodebuild
  61. run: scripts/setup_spm_tests.sh
  62. - name: Unit Tests
  63. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSharedSwiftTests ${{ matrix.target }} spm