firebaseai.yml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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/quickstart_spm_xcodeproj.sh'
  11. - 'Gemfile*'
  12. # Do not run for documentation-only PRs.
  13. - '!**.md'
  14. schedule:
  15. # Run every day at 11pm (PST) - 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. runs-on: ${{ matrix.os }}
  39. needs: spm
  40. env:
  41. TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }}
  42. TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
  43. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  44. secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }}
  45. steps:
  46. - uses: actions/checkout@v4
  47. - uses: actions/cache/restore@v4
  48. with:
  49. path: .build
  50. key: ${{ needs.spm.outputs.cache_key }}
  51. - name: Install Secret GoogleService-Info.plist
  52. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \
  53. FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase"
  54. - name: Install Secret GoogleService-Info-Spark.plist
  55. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \
  56. FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase"
  57. - name: Install Secret Credentials.swift
  58. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \
  59. FirebaseAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase"
  60. - name: Xcode
  61. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  62. - name: Run IntegrationTests
  63. run: scripts/build.sh FirebaseAIIntegration ${{ matrix.target }}
  64. - name: Upload xcodebuild logs
  65. if: failure()
  66. uses: actions/upload-artifact@v4
  67. with:
  68. name: xcodebuild-${{ matrix.target }}-${{ matrix.os }}-${{ matrix.xcode }}.log
  69. path: xcodebuild-*.log
  70. retention-days: 2
  71. pod_lib_lint:
  72. uses: ./.github/workflows/common_cocoapods.yml
  73. with:
  74. product: FirebaseAI
  75. supports_swift6: true
  76. setup_command: scripts/update_vertexai_responses.sh
  77. quickstart:
  78. runs-on: macos-15
  79. env:
  80. BRANCH_NAME: ${{ github.head_ref || github.ref_name || 'main' }}
  81. steps:
  82. - uses: actions/checkout@v4
  83. - name: Build Quickstart
  84. run: scripts/quickstart_build_spm.sh FirebaseAI