spm.yml 2.5 KB

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