spm.yml 2.1 KB

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