Skip to content
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
21 changes: 14 additions & 7 deletions .github/workflows/firebaseai.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: firebaseai

permissions:
contents: read

on:
pull_request:
paths:
Expand All @@ -19,20 +22,24 @@ env:

jobs:
spm:
name: spm (Xcode ${{ matrix.xcode }} - ${{ matrix.os }})
runs-on: macOS-15
name: spm (Xcode ${{ matrix.xcode }} - ${{ matrix.platform }})
strategy:
matrix:
xcode: ["16.4"]
os: [iOS]
include:
- os: iOS
- os: macos-15
xcode: "16.4"
platform: iOS
device: iPhone 16
- os: macos-26
xcode: "26.0"
platform: iOS
device: iPhone 16e
runs-on: ${{ matrix.os }}
env:
SETUP: firebaseai
SPM: true
DIR: firebaseai
OS: ${{ matrix.os }}
OS: ${{ matrix.platform }}
DEVICE: ${{ matrix.device }}
TEST: false
XCODE_VERSION: ${{ matrix.xcode }}
Expand All @@ -45,5 +52,5 @@ jobs:
gem install xcpretty
- name: Placeholder GoogleService-Info.plist good enough for build only testing.
run: cp ./mock-GoogleService-Info.plist ./firebaseai/GoogleService-Info.plist
- name: Build and Test SwiftUI (${{ matrix.os }})
- name: Build and Test SwiftUI (${{ matrix.platform }})
run: ./scripts/test.sh
17 changes: 12 additions & 5 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@

set -euo pipefail

if [ -d "/Applications/Xcode_16.4.app" ]; then
xcode_version="16.4"
iphone_version="16"
xcode_version=$(xcodebuild -version | grep Xcode)
xcode_version="${xcode_version/Xcode /}"
xcode_major="${xcode_version/.*/}"

if [[ "$xcode_major" -ge 26 ]]; then
iphone_version="17"
elif [[ "$xcode_major" -ge 16 ]]; then
iphone_version="16"
elif [[ "$xcode_major" -ge 15 ]]; then
iphone_version="15"
else
xcode_version="15.3"
iphone_version="15"
echo "Unsupported Xcode version $xcode_version; exiting." 1>&2
exit 1
fi

# Set default parameters
Expand Down