spm.yml 2.3 KB

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