firebaseai.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. target: [iOS]
  37. os: [macos-15]
  38. include:
  39. - os: macos-15
  40. xcode: Xcode_16.4
  41. - os: macos-26
  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: Install Secret GoogleService-Info.plist
  57. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info.plist.gpg \
  58. FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase"
  59. - name: Install Secret GoogleService-Info-Spark.plist
  60. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info-Spark.plist.gpg \
  61. FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase"
  62. - name: Install Secret Credentials.swift
  63. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-Credentials.swift.gpg \
  64. FirebaseAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase"
  65. - name: Xcode
  66. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  67. - name: Run IntegrationTests
  68. run: scripts/build.sh FirebaseAIIntegration ${{ matrix.target }}
  69. - name: Upload xcodebuild logs
  70. if: failure()
  71. uses: actions/upload-artifact@v4
  72. with:
  73. name: xcodebuild-${{ matrix.target }}-${{ matrix.os }}-${{ matrix.xcode }}.log
  74. path: xcodebuild-*.log
  75. retention-days: 2
  76. pod_lib_lint:
  77. strategy:
  78. matrix:
  79. product: [FirebaseAILogic, FirebaseAI]
  80. uses: ./.github/workflows/common_cocoapods.yml
  81. with:
  82. product: ${{ matrix.product }}
  83. supports_swift6: true
  84. setup_command: scripts/update_vertexai_responses.sh
  85. quickstart:
  86. strategy:
  87. matrix:
  88. include:
  89. - os: macos-15
  90. xcode: Xcode_16.4
  91. - os: macos-26
  92. xcode: Xcode_26.0
  93. runs-on: ${{ matrix.os }}
  94. env:
  95. BRANCH_NAME: ${{ github.head_ref || github.ref_name || 'main' }}
  96. steps:
  97. - uses: actions/checkout@v4
  98. - name: Xcode
  99. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  100. - name: Build Quickstart
  101. run: scripts/quickstart_build_spm.sh FirebaseAI