firebaseai.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. name: firebaseai
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseAI**'
  6. - '.github/workflows/firebaseai.yml'
  7. - '.github/workflows/common.yml'
  8. - '.github/workflows/common_cocoapods.yml'
  9. - 'scripts/quickstart_build_spm.sh'
  10. - 'scripts/update_firebase_spm_dependency.sh'
  11. - 'Gemfile*'
  12. # Do not run for documentation-only PRs.
  13. - '!**.md'
  14. schedule:
  15. # Run every day at 12am (PDT) / 3am (EDT) - cron uses UTC times
  16. - cron: '0 7 * * *'
  17. workflow_dispatch:
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  20. cancel-in-progress: true
  21. permissions:
  22. contents: read # Needed for actions/checkout
  23. actions: write # Needed for actions/cache (save and restore)
  24. jobs:
  25. spm:
  26. strategy:
  27. matrix:
  28. target: [FirebaseAILogicUnit, FirebaseAIUnit]
  29. uses: ./.github/workflows/common.yml
  30. with:
  31. target: ${{ matrix.target }}
  32. setup_command: scripts/update_vertexai_responses.sh
  33. testapp-integration:
  34. strategy:
  35. matrix:
  36. include:
  37. - os: macos-15
  38. target: iOS
  39. xcode: Xcode_16.4
  40. - os: macos-26
  41. target: iOS
  42. xcode: Xcode_26.0
  43. runs-on: ${{ matrix.os }}
  44. needs: spm
  45. env:
  46. TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }}
  47. TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
  48. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  49. secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }}
  50. steps:
  51. - uses: actions/checkout@v4
  52. - uses: actions/cache/restore@v4
  53. with:
  54. path: .build
  55. key: ${{ needs.spm.outputs.cache_key }}
  56. - name: Run integration tests
  57. run: scripts/repo.sh tests run --secrets ./scripts/secrets/AI.json --platforms ${{ matrix.target }} --xcode ${{ matrix.xcode }} AI
  58. - name: Upload xcodebuild logs
  59. if: failure()
  60. uses: actions/upload-artifact@v4
  61. with:
  62. name: xcodebuild-${{ matrix.target }}-${{ matrix.os }}-${{ matrix.xcode }}.log
  63. path: xcodebuild-*.log
  64. retention-days: 2
  65. pod_lib_lint:
  66. strategy:
  67. matrix:
  68. product: [FirebaseAILogic, FirebaseAI]
  69. uses: ./.github/workflows/common_cocoapods.yml
  70. with:
  71. product: ${{ matrix.product }}
  72. supports_swift6: true
  73. setup_command: scripts/update_vertexai_responses.sh
  74. quickstart:
  75. strategy:
  76. matrix:
  77. include:
  78. - os: macos-15
  79. xcode: Xcode_16.4
  80. - os: macos-26
  81. xcode: Xcode_26.0
  82. runs-on: ${{ matrix.os }}
  83. env:
  84. BRANCH_NAME: ${{ github.head_ref || github.ref_name || 'main' }}
  85. steps:
  86. - uses: actions/checkout@v4
  87. - name: Xcode
  88. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  89. - name: Build Quickstart
  90. run: scripts/quickstart_build_spm.sh FirebaseAI