Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Sample in CI #12616

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
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: 37 additions & 5 deletions .github/workflows/vertexai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: vertexai
on:
pull_request:
paths:
- 'FirebaseVertexAI**'
- '.github/workflows/vertexai.yml'
- 'Gemfile*'
- 'FirebaseVertexAI**'
- '.github/workflows/vertexai.yml'
- 'Gemfile*'
schedule:
# Run every day at 11pm (PST) - cron uses UTC times
- cron: '0 7 * * *'
Expand All @@ -32,5 +32,37 @@ jobs:
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: Build and run tests
run: scripts/third_party/travis/retry.sh scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm
- uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm

sample:
strategy:
matrix:
# Test build with debug and release configs (whether or not DEBUG is set and optimization level)
build: [build]
include:
- os: macos-13
xcode: Xcode_15.0.1
- os: macos-14
xcode: Xcode_15.2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/build.sh VertexSample iOS
1 change: 1 addition & 0 deletions FirebaseVertexAI/Tests/Unit/GenerativeModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ private extension URLRequest {
}
}

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, *)
class AppCheckInteropFake: NSObject, AppCheckInterop {
/// The placeholder token value returned when an error occurs
static let placeholderTokenValue = "placeholder-token"
Expand Down
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,14 @@ case "$product-$platform-$method" in
build
;;

VertexSample-*-*)
RunXcodebuild \
-project 'FirebaseVertexAI/Sample/GenerativeAISample.xcodeproj' \
-scheme "GenerativeAISample" \
"${xcb_flags[@]}" \
build
;;

Sessions-*-integration)
# Perform "pod install" to install the relevant dependencies
# ./FirebaseSessions/generate_testapp.sh
Expand Down
Loading