Skip to content
36 changes: 36 additions & 0 deletions .github/workflows/vertexai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ concurrency:
cancel-in-progress: true

jobs:
spm-package-resolved:
runs-on: macos-14
outputs:
package_resolved_hash: ${{ steps.swift_package_resolve.outputs.package_resolved }}
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
steps:
- uses: actions/checkout@v4
- name: Generate Swift Package.resolved
id: swift_package_resolve
run: |
swift package resolve
package_resolved_sha256=($(shasum -a 256 Package.resolved))
echo "package_resolved_hash=$package_resolved_sha256" >> "$GITHUB_OUTPUT"

spm-unit:
strategy:
max-parallel: 1
Expand All @@ -25,9 +40,16 @@ 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/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{needs.spm-package-resolved.outputs.package_resolved_hash}}
restore-keys: |
${{ runner.os }}-spm-
- uses: actions/checkout@v4
- name: Clone mock responses
run: scripts/update_vertexai_responses.sh
Expand All @@ -53,11 +75,18 @@ jobs:
- 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/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{needs.spm-package-resolved.outputs.package_resolved_hash}}
restore-keys: |
${{ runner.os }}-spm-
- uses: actions/checkout@v4
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/vertexai-integration.plist.gpg \
Expand Down Expand Up @@ -108,9 +137,16 @@ 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/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{needs.spm-package-resolved.outputs.package_resolved_hash}}
restore-keys: |
${{ runner.os }}-spm-
- uses: actions/checkout@v4
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
Expand Down
Loading