spm.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. - 'SwiftPM-PlatformExclude'
  11. - 'Gemfile*'
  12. schedule:
  13. # Run every day at 12am (PST) - cron uses UTC times
  14. - cron: '0 8 * * *'
  15. # This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs
  16. # because each platform takes 15-20 minutes after adding Firestore.
  17. jobs:
  18. swift-build-run:
  19. # Don't run on private repo unless it is a PR.
  20. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  21. runs-on: macos-11
  22. steps:
  23. - uses: actions/checkout@v2
  24. - name: Initialize xcodebuild
  25. run: scripts/setup_spm_tests.sh
  26. - name: Functions Integration Test Server
  27. run: FirebaseFunctions/Backend/start.sh synchronous
  28. - name: iOS Unit Tests
  29. run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm
  30. # Test iOS Device build since some Firestore dependencies build different files.
  31. iOS-Device:
  32. # Don't run on private repo unless it is a PR.
  33. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  34. runs-on: macos-11
  35. steps:
  36. - uses: actions/checkout@v2
  37. - name: Initialize xcodebuild
  38. run: scripts/setup_spm_tests.sh
  39. - name: iOS Device and Test Build
  40. run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly
  41. platforms:
  42. # Don't run on private repo unless it is a PR.
  43. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  44. runs-on: macos-11
  45. strategy:
  46. matrix:
  47. target: [tvOS, macOS, catalyst]
  48. # Full set of Firebase-Package tests only run on iOS.
  49. steps:
  50. - uses: actions/checkout@v2
  51. - name: Initialize xcodebuild
  52. run: scripts/setup_spm_tests.sh
  53. - name: Objc Import Tests
  54. run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm
  55. - name: Swift Tests
  56. run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm
  57. - name: Version Tests
  58. run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm
  59. - name: Analytics Build Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm