shared-swift.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: shared-swift
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseSharedSwift**'
  6. - 'Gemfile*'
  7. schedule:
  8. # Run every day at 3am (PST) - cron uses UTC times
  9. - cron: '0 11 * * *'
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  12. cancel-in-progress: true
  13. jobs:
  14. pod-lib-lint:
  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-11
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos, watchos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Build and test
  26. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }}
  27. spm:
  28. # Don't run on private repo unless it is a PR.
  29. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  30. runs-on: macos-11
  31. strategy:
  32. matrix:
  33. target: [iOS, tvOS, macOS, catalyst, watchOS]
  34. steps:
  35. - uses: actions/checkout@v2
  36. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  37. with:
  38. cache_key: ${{ matrix.os }}
  39. - name: Initialize xcodebuild
  40. run: scripts/setup_spm_tests.sh
  41. - name: Unit Tests
  42. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSharedSwiftTests ${{ matrix.target }} spm