spm.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 Device and Test Build
  37. run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly
  38. platforms:
  39. # Don't run on private repo unless it is a PR.
  40. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  41. runs-on: macos-11
  42. strategy:
  43. matrix:
  44. target: [tvOS, macOS, catalyst]
  45. # Full set of Firebase-Package tests only run on iOS because of Analytics.
  46. steps:
  47. - uses: actions/checkout@v2
  48. - name: Initialize xcodebuild
  49. run: scripts/setup_spm_tests.sh
  50. - name: Objc Import Tests
  51. run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm
  52. - name: Swift Tests
  53. run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm
  54. - name: Version Tests
  55. run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm
  56. - name: Analytics Build Tests
  57. run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm