spm.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: spm
  2. on:
  3. pull_request:
  4. paths:
  5. - '.github/workflows/spm.yml'
  6. - 'Package.swift'
  7. - '.swiftpm/*'
  8. - 'scripts/build.sh'
  9. - 'SwiftPMTests/*'
  10. - 'Gemfile*'
  11. schedule:
  12. # Run every day at 12am (PST) - cron uses UTC times
  13. - cron: '0 8 * * *'
  14. # This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs
  15. # because each platform takes 15-20 minutes after adding Firestore.
  16. jobs:
  17. swift-build-run:
  18. # Don't run on private repo unless it is a PR.
  19. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  20. runs-on: macos-11
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Initialize xcodebuild
  24. run: scripts/setup_spm_tests.sh
  25. - name: iOS Unit Tests
  26. run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm
  27. # Test iOS Device build since some Firestore dependencies build different files.
  28. iOS-Device:
  29. # Don't run on private repo unless it is a PR.
  30. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  31. runs-on: macos-11
  32. steps:
  33. - uses: actions/checkout@v2
  34. - name: Initialize xcodebuild
  35. run: scripts/setup_spm_tests.sh
  36. - name: iOS Unit Tests
  37. # TODO (#7785) Change to Firebase-Package when #7785 is resolved.
  38. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift-Beta iOS-device spmbuildonly
  39. platforms:
  40. # Don't run on private repo unless it is a PR.
  41. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  42. runs-on: macos-11
  43. strategy:
  44. matrix:
  45. target: [tvOS, macOS, catalyst]
  46. # Full set of Firebase-Package tests only run on iOS because of Analytics.
  47. steps:
  48. - uses: actions/checkout@v2
  49. - name: Initialize xcodebuild
  50. run: scripts/setup_spm_tests.sh
  51. - name: Objc Import Tests
  52. run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm
  53. - name: Swift Tests
  54. run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm
  55. - name: Version Tests
  56. run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm