core_internal.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. include:
  60. - os: macos-13
  61. xcode: Xcode_15.2
  62. target: iOS
  63. - os: macos-14
  64. xcode: Xcode_15.4
  65. target: iOS
  66. - os: macos-15
  67. xcode: Xcode_16
  68. target: iOS
  69. - os: macos-15
  70. xcode: Xcode_16
  71. target: tvOS
  72. - os: macos-15
  73. xcode: Xcode_16
  74. target: macOS
  75. - os: macos-15
  76. xcode: Xcode_16
  77. target: watchOS
  78. - os: macos-15
  79. xcode: Xcode_16
  80. target: catalyst
  81. - os: macos-15
  82. xcode: Xcode_16
  83. target: visionOS
  84. runs-on: ${{ matrix.os }}
  85. steps:
  86. - uses: actions/checkout@v4
  87. - uses: actions/cache/restore@v4
  88. with:
  89. path: .build
  90. key: ${{needs.spm-package-resolved.outputs.cache_key}}
  91. - name: Initialize xcodebuild
  92. run: scripts/setup_spm_tests.sh
  93. - name: Xcode
  94. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  95. - name: FirebaseCoreInternalTests
  96. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCoreInternalTests ${{ matrix.target }} spm
  97. catalyst:
  98. # Don't run on private repo unless it is a PR.
  99. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  100. runs-on: macos-14
  101. steps:
  102. - uses: actions/checkout@v4
  103. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  104. with:
  105. cache_key: catalyst${{ matrix.os }}
  106. - uses: ruby/setup-ruby@v1
  107. - name: Setup Bundler
  108. run: scripts/setup_bundler.sh
  109. - name: Setup Catalyst project and run unit tests
  110. run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit
  111. - name: Setup Catalyst project and run integration tests
  112. run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration
  113. core-internal-cron-only:
  114. # Don't run on private repo.
  115. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  116. runs-on: macos-14
  117. strategy:
  118. matrix:
  119. target: [ios, tvos, macos]
  120. flags: [
  121. '--use-static-frameworks'
  122. ]
  123. needs: pod-lib-lint
  124. steps:
  125. - uses: actions/checkout@v4
  126. - uses: ruby/setup-ruby@v1
  127. - name: Setup Bundler
  128. run: scripts/setup_bundler.sh
  129. - name: PodLibLint CoreInternal Cron
  130. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}