spm.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: spm
  2. on:
  3. pull_request:
  4. paths:
  5. - '.github/workflows/spm.yml'
  6. - 'Package.swift'
  7. - 'Gemfile'
  8. schedule:
  9. # Run every day at 12am (PST) - cron uses UTC times
  10. - cron: '0 8 * * *'
  11. # This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs
  12. # because each platform takes 15-20 minutes after adding Firestore.
  13. jobs:
  14. swift-build-run:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. runs-on: macOS-latest
  18. steps:
  19. - uses: actions/checkout@v2
  20. - name: Xcode 12
  21. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  22. - name: Initialize xcodebuild
  23. run: xcodebuild -list
  24. - name: iOS Unit Tests
  25. run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm
  26. cron-only:
  27. # Don't run on private repo.
  28. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  29. runs-on: macOS-latest
  30. strategy:
  31. matrix:
  32. target: [tvOS, macOS, catalyst]
  33. # Full set of Firebase-Package tests only run on iOS because of Analytics.
  34. test: [objc-import-test, swift-test, version-test]
  35. steps:
  36. - uses: actions/checkout@v2
  37. - name: Xcode 12
  38. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  39. - name: Initialize xcodebuild
  40. run: xcodebuild -list
  41. - name: Unit Tests
  42. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ${{ matrix.test }} ${{ matrix.target }} spm