firebaseai.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. uses: ./.github/workflows/common.yml
  27. with:
  28. target: FirebaseAIUnit
  29. setup_command: scripts/update_vertexai_responses.sh
  30. testapp-integration:
  31. strategy:
  32. matrix:
  33. target: [iOS]
  34. os: [macos-15]
  35. include:
  36. - os: macos-15
  37. xcode: Xcode_16.4
  38. - os: macos-26
  39. xcode: Xcode_26.0
  40. runs-on: ${{ matrix.os }}
  41. needs: spm
  42. env:
  43. TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }}
  44. TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
  45. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  46. secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }}
  47. steps:
  48. - uses: actions/checkout@v4
  49. - uses: actions/cache/restore@v4
  50. with:
  51. path: .build
  52. key: ${{ needs.spm.outputs.cache_key }}
  53. - name: Install Secret GoogleService-Info.plist
  54. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \
  55. FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase"
  56. - name: Install Secret GoogleService-Info-Spark.plist
  57. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \
  58. FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase"
  59. - name: Install Secret Credentials.swift
  60. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \
  61. FirebaseAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase"
  62. - name: Xcode
  63. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  64. - name: Run IntegrationTests
  65. run: scripts/build.sh FirebaseAIIntegration ${{ matrix.target }}
  66. - name: Upload xcodebuild logs
  67. if: failure()
  68. uses: actions/upload-artifact@v4
  69. with:
  70. name: xcodebuild-${{ matrix.target }}-${{ matrix.os }}-${{ matrix.xcode }}.log
  71. path: xcodebuild-*.log
  72. retention-days: 2
  73. pod_lib_lint:
  74. uses: ./.github/workflows/common_cocoapods.yml
  75. with:
  76. product: FirebaseAI
  77. supports_swift6: true
  78. setup_command: scripts/update_vertexai_responses.sh
  79. quickstart:
  80. strategy:
  81. matrix:
  82. include:
  83. - os: macos-15
  84. xcode: Xcode_16.4
  85. - os: macos-26
  86. xcode: Xcode_26.0
  87. runs-on: ${{ matrix.os }}
  88. env:
  89. BRANCH_NAME: ${{ github.head_ref || github.ref_name || 'main' }}
  90. steps:
  91. - uses: actions/checkout@v4
  92. - name: Xcode
  93. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  94. - name: Build Quickstart
  95. run: scripts/quickstart_build_spm.sh FirebaseAI