spm.yml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. # TODO(Swift 6): Re-enable these tests.
  2. # name: spm
  3. # on:
  4. # workflow_dispatch:
  5. # pull_request:
  6. # paths:
  7. # - '.github/workflows/spm.yml'
  8. # - 'Package.swift'
  9. # - '.swiftpm/*'
  10. # - 'scripts/build.sh'
  11. # - 'SwiftPMTests/*'
  12. # - 'SwiftPM-PlatformExclude'
  13. # - 'Gemfile*'
  14. # schedule:
  15. # # Run every day at 12am (PST) - cron uses UTC times
  16. # - cron: '0 8 * * *'
  17. # # This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs
  18. # # because each platform takes 15-20 minutes after adding Firestore.
  19. # concurrency:
  20. # group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  21. # cancel-in-progress: true
  22. # env:
  23. # FIREBASE_CI: true
  24. # jobs:
  25. # spm-package-resolved:
  26. # env:
  27. # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  28. # runs-on: macos-15
  29. # outputs:
  30. # cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  31. # steps:
  32. # - uses: actions/checkout@v4
  33. # - name: Xcode
  34. # run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  35. # - name: Generate Swift Package.resolved
  36. # id: swift_package_resolve
  37. # run: |
  38. # swift package resolve
  39. # - name: Generate cache key
  40. # id: generate_cache_key
  41. # run: |
  42. # cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  43. # echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  44. # - uses: actions/cache/save@v4
  45. # id: cache
  46. # with:
  47. # path: .build
  48. # key: ${{ steps.generate_cache_key.outputs.cache_key }}
  49. # swift-build-run:
  50. # # Don't run on private repo unless it is a PR.
  51. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  52. # needs: [spm-package-resolved]
  53. # strategy:
  54. # matrix:
  55. # include:
  56. # - os: macos-15
  57. # xcode: Xcode_16.3
  58. # test: spm
  59. # - os: macos-14
  60. # xcode: Xcode_16.2
  61. # test: spm
  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: Clone mock responses for Vertex AI unit tests
  70. # run: scripts/update_vertexai_responses.sh
  71. # - name: Xcode
  72. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  73. # - name: Initialize xcodebuild
  74. # run: scripts/setup_spm_tests.sh
  75. # - name: Functions Integration Test Server
  76. # run: FirebaseFunctions/Backend/start.sh synchronous
  77. # - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  78. # with:
  79. # timeout_minutes: 120
  80. # max_attempts: 3
  81. # retry_on: error
  82. # retry_wait_seconds: 120
  83. # command: scripts/build.sh Firebase-Package iOS ${{ matrix.test }}
  84. # # Test iOS Device build since some Firestore dependencies build different files.
  85. # iOS-Device:
  86. # # Don't run on private repo unless it is a PR.
  87. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  88. # needs: [spm-package-resolved]
  89. # strategy:
  90. # matrix:
  91. # include:
  92. # - os: macos-14
  93. # xcode: Xcode_16.2
  94. # - os: macos-15
  95. # xcode: Xcode_16.2
  96. # runs-on: ${{ matrix.os }}
  97. # steps:
  98. # - uses: actions/checkout@v4
  99. # - uses: actions/cache/restore@v4
  100. # with:
  101. # path: .build
  102. # key: ${{needs.spm-package-resolved.outputs.cache_key}}
  103. # - name: Clone mock responses for Vertex AI unit tests
  104. # run: scripts/update_vertexai_responses.sh
  105. # - name: Xcode
  106. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  107. # - name: Initialize xcodebuild
  108. # run: scripts/setup_spm_tests.sh
  109. # - name: iOS Device and Test Build
  110. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly
  111. # platforms:
  112. # # Don't run on private repo unless it is a PR.
  113. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  114. # needs: [spm-package-resolved]
  115. # strategy:
  116. # matrix:
  117. # # Full set of Firebase-Package tests only run on iOS. Run subset on other platforms.
  118. # # visionOS isn't buildable from here (even with Firestore source) because the test
  119. # # targets need Analytics.
  120. # target: [tvOS, macOS, catalyst]
  121. # include:
  122. # - os: macos-15
  123. # xcode: Xcode_16.2
  124. # - os: macos-14
  125. # xcode: Xcode_16.2
  126. # runs-on: ${{ matrix.os }}
  127. # steps:
  128. # - uses: actions/checkout@v4
  129. # - uses: actions/cache/restore@v4
  130. # with:
  131. # path: .build
  132. # key: ${{needs.spm-package-resolved.outputs.cache_key}}
  133. # - name: Xcode
  134. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  135. # - name: Initialize xcodebuild
  136. # run: scripts/setup_spm_tests.sh
  137. # - name: Objc Import Tests
  138. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm
  139. # - name: Swift Tests
  140. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm
  141. # - name: Version Tests
  142. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm
  143. # - name: Analytics Build Tests
  144. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm