core_internal.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. name: core_internal
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseCoreInternal.podspec'
  6. - 'FirebaseCore/Internal/**'
  7. - '.github/workflows/core_internal.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 2am (PST) - cron uses UTC times
  11. - cron: '0 10 * * *'
  12. jobs:
  13. pod-lib-lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  16. strategy:
  17. matrix:
  18. target: [ios, tvos, macos, watchos]
  19. os: [macos-14]
  20. xcode: [Xcode_15.2, Xcode_16]
  21. runs-on: ${{ matrix.os }}
  22. steps:
  23. - uses: actions/checkout@v4
  24. - uses: ruby/setup-ruby@v1
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Xcode
  28. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  29. - name: Build and test
  30. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }}
  31. spm-package-resolved:
  32. env:
  33. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  34. runs-on: macos-14
  35. outputs:
  36. cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  37. steps:
  38. - uses: actions/checkout@v4
  39. - name: Generate Swift Package.resolved
  40. id: swift_package_resolve
  41. run: |
  42. swift package resolve
  43. - name: Generate cache key
  44. id: generate_cache_key
  45. run: |
  46. cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  47. echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  48. - uses: actions/cache/save@v4
  49. id: cache
  50. with:
  51. path: .build
  52. key: ${{ steps.generate_cache_key.outputs.cache_key }}
  53. spm:
  54. # Don't run on private repo unless it is a PR.
  55. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  56. needs: [spm-package-resolved]
  57. strategy:
  58. matrix:
  59. target: [iOS, tvOS, macOS, catalyst, watchOS]
  60. os: [macos-14]
  61. xcode: [Xcode_15.2, Xcode_16]
  62. runs-on: ${{ matrix.os }}
  63. steps:
  64. - uses: actions/checkout@v4
  65. - uses: actions/cache/restore@v4
  66. with:
  67. path: .build
  68. key: ${{needs.spm-package-resolved.outputs.cache_key}}
  69. - name: Initialize xcodebuild
  70. run: scripts/setup_spm_tests.sh
  71. - name: Xcode
  72. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  73. - name: FirebaseCoreInternalTests
  74. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCoreInternalTests ${{ matrix.target }} spm
  75. catalyst:
  76. # Don't run on private repo unless it is a PR.
  77. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  78. runs-on: macos-14
  79. steps:
  80. - uses: actions/checkout@v4
  81. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  82. with:
  83. cache_key: catalyst${{ matrix.os }}
  84. - uses: ruby/setup-ruby@v1
  85. - name: Setup Bundler
  86. run: scripts/setup_bundler.sh
  87. - name: Setup Catalyst project and run unit tests
  88. run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit
  89. - name: Setup Catalyst project and run integration tests
  90. run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration
  91. core-internal-cron-only:
  92. # Don't run on private repo.
  93. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  94. runs-on: macos-14
  95. strategy:
  96. matrix:
  97. target: [ios, tvos, macos]
  98. flags: [
  99. '--use-static-frameworks'
  100. ]
  101. needs: pod-lib-lint
  102. steps:
  103. - uses: actions/checkout@v4
  104. - uses: ruby/setup-ruby@v1
  105. - name: Setup Bundler
  106. run: scripts/setup_bundler.sh
  107. - name: PodLibLint CoreInternal Cron
  108. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}