shared-swift.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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-12
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos, watchos]
  21. steps:
  22. - uses: actions/checkout@v3
  23. - uses: ruby/setup-ruby@v1
  24. - name: Setup Bundler
  25. run: scripts/setup_bundler.sh
  26. - name: Build and test
  27. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }}
  28. spm:
  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-12
  32. strategy:
  33. matrix:
  34. target: [iOS, tvOS, macOS, catalyst, watchOS]
  35. steps:
  36. - uses: actions/checkout@v3
  37. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  38. with:
  39. cache_key: ${{ matrix.os }}
  40. - name: Initialize xcodebuild
  41. run: scripts/setup_spm_tests.sh
  42. - name: Unit Tests
  43. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSharedSwiftTests ${{ matrix.target }} spm