spm.yml 2.9 KB

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