Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions .github/workflows/vertexai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,47 @@ concurrency:
cancel-in-progress: true

jobs:
spm-package-resolved:
runs-on: macos-14
outputs:
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
steps:
- uses: actions/checkout@v4
- name: Generate Swift Package.resolved
id: swift_package_resolve
run: |
swift package resolve
- name: Generate cache key
id: generate_cache_key
run: |
cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
- uses: actions/cache/save@v4
id: cache
with:
path: .build
key: ${{ steps.generate_cache_key.outputs.cache_key }}

spm-unit:
strategy:
max-parallel: 1
matrix:
target: [iOS, macOS, catalyst, tvOS, visionOS, watchOS]
os: [macos-14]
include:
- os: macos-14
xcode: Xcode_15.2
runs-on: ${{ matrix.os }}
needs: spm-package-resolved
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Clone mock responses
run: scripts/update_vertexai_responses.sh
- name: Xcode
Expand All @@ -45,20 +72,24 @@ jobs:

spm-integration:
strategy:
max-parallel: 1
matrix:
target: [iOS]
os: [macos-14]
include:
- os: macos-14
xcode: Xcode_15.2
runs-on: ${{ matrix.os }}
needs: spm-package-resolved
env:
TEST_RUNNER_VertexAIRunIntegrationTests: 1
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/vertexai-integration.plist.gpg \
FirebaseVertexAI/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
Expand Down Expand Up @@ -108,14 +139,17 @@ jobs:
- os: macos-14
xcode: Xcode_15.2
runs-on: ${{ matrix.os }}
needs: spm-package-resolved
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
run: xcodebuild -list
- name: Placeholder GoogleService-Info.plist for build testing
run: cp FirebaseCore/Tests/Unit/Resources/GoogleService-Info.plist FirebaseVertexAI/Sample/
- uses: nick-fields/retry@v3
Expand Down
Loading