Skip to content

Commit 022f47d

Browse files
committed
Merge branch 'main' into ai-structured-output
2 parents a7d5c3e + 5c4a227 commit 022f47d

File tree

10 files changed

+92
-23
lines changed

10 files changed

+92
-23
lines changed

.github/workflows/_cocoapods.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,27 +110,37 @@ on:
110110
required: false
111111
default: ""
112112

113-
# The timeout (in minutes) for the linting to complete. Defaults to 15.
113+
# The timeout (in minutes) for the linting to complete. Defaults to 20.
114114
timeout_minutes:
115115
type: number
116116
required: false
117-
default: 15
117+
default: 20
118118

119119
jobs:
120120
pod-lib-lint:
121121
# Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
122122
if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
123123
strategy:
124+
fail-fast: false
124125
matrix:
125-
os: [macos-15]
126-
xcode: [Xcode_16.4]
126+
os: [macos-15, macos-26]
127+
xcode: [Xcode_16.4, Xcode_26.2]
127128
platform: [iOS, tvOS, macOS, watchOS]
129+
exclude:
130+
- os: macos-15
131+
xcode: Xcode_26.2
132+
- os: macos-26
133+
xcode: Xcode_16.4
128134
include:
129135
- os: macos-14
130136
xcode: Xcode_16.2
131137
platform: iOS
132138
runs-on: ${{ matrix.os }}
133139
steps:
140+
- name: Skip, if applicable.
141+
# Skip matrix combinations that weren't requested, while preserving the specific macos-14 / iOS inclusion.
142+
if: contains(join(inputs.platforms), matrix.platform) == false && matrix.os != 'macos-14'
143+
run: exit 0
134144
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
135145
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
136146
- name: Setup Bundler
@@ -142,6 +152,15 @@ jobs:
142152
command: scripts/setup_bundler.sh
143153
- name: Xcode
144154
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
155+
- name: Install simulators in case they are missing.
156+
if: matrix.platform != 'macOS'
157+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
158+
with:
159+
timeout_minutes: 15
160+
max_attempts: 5
161+
retry_wait_seconds: 120
162+
continue_on_error: true
163+
command: xcodebuild -downloadPlatform ${{ matrix.platform }}
145164
- name: Set conditional environment variable, if needed.
146165
if: inputs.product == 'FirebaseAuth'
147166
run: echo "FIREBASE_CI=true" >> $GITHUB_ENV

.github/workflows/_spm.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,20 @@ jobs:
9595
env:
9696
FIREBASE_IS_NIGHTLY_TESTING: ${{ inputs.is_nightly && '1' || '' }}
9797
strategy:
98+
fail-fast: false
9899
matrix:
99-
os: [macos-15]
100-
xcode: [Xcode_16.4]
100+
os: [macos-15, macos-26]
101+
xcode: [Xcode_16.4, Xcode_26.2]
101102
platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS]
103+
exclude:
104+
- os: macos-15
105+
xcode: Xcode_26.2
106+
- os: macos-26
107+
xcode: Xcode_16.4
102108
include:
103109
- os: macos-14
104110
xcode: Xcode_16.2
105111
platform: iOS
106-
- os: macos-26
107-
xcode: Xcode_26.1
108-
platform: iOS
109112
runs-on: ${{ matrix.os }}
110113
steps:
111114
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -115,6 +118,15 @@ jobs:
115118
key: ${{needs.spm-package-resolved.outputs.cache_key}}
116119
- name: Xcode
117120
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
121+
- name: Install simulators in case they are missing.
122+
if: matrix.platform != 'macOS' && matrix.platform != 'catalyst'
123+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
124+
with:
125+
timeout_minutes: 15
126+
max_attempts: 5
127+
retry_wait_seconds: 120
128+
continue_on_error: true
129+
command: xcodebuild -downloadPlatform ${{ matrix.platform }}
118130
- name: Run setup command, if needed.
119131
if: inputs.setup_command != ''
120132
run: ${{ inputs.setup_command }}
@@ -144,4 +156,5 @@ jobs:
144156
with:
145157
name: xcresults-${{ inputs.target }}-${{ matrix.platform }}-${{ matrix.os }}-${{ matrix.xcode }}
146158
path: xcresults/*
147-
if-no-files-found: error
159+
# If build did not succeed, then xcresult won't exist. Warn for visibility.
160+
if-no-files-found: warn

.github/workflows/sdk.ai.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,13 @@ jobs:
9696
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9797
- name: Xcode
9898
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
99+
- name: Install simulators in case they are missing.
100+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
101+
with:
102+
timeout_minutes: 15
103+
max_attempts: 5
104+
retry_wait_seconds: 120
105+
continue_on_error: true
106+
command: xcodebuild -downloadPlatform iOS
99107
- name: Build Quickstart
100108
run: scripts/quickstart_build_spm.sh FirebaseAI

.github/workflows/sdk.firestore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ jobs:
390390
platforms: iOS
391391
allow_warnings: true
392392
analyze: false # TODO(#9565, b/227461966): Remove when absl is fixed.
393-
timeout_minutes: 30
393+
timeout_minutes: 40
394394

395395
# `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron.
396396
pod-lib-lint-cron:

Crashlytics/UnitTests/FIRCLSUserDefaultsTests.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ - (void)testDictionaryRepresentation {
7272
NSDictionary* testDict = [_userDefaults dictionaryRepresentation];
7373
NSLog(@"%@", testDict);
7474

75-
NSLog(@"foooo");
76-
7775
XCTAssertEqualObjects(testDict, expectedTestDict, @"");
7876
}
7977

FirebaseCore/Internal/Tests/Unit/HeartbeatStorageTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ class HeartbeatStorageTests: XCTestCase {
6464
func testCachedInstancesCannotBeRetainedWeakly() {
6565
// Given
6666
var strongHeartbeatStorage: HeartbeatStorage? = .getInstance(id: "sparky")
67-
weak var weakHeartbeatStorage: HeartbeatStorage? = .getInstance(id: "sparky")
67+
#if swift(>=6.2)
68+
weak let weakHeartbeatStorage: HeartbeatStorage? = .getInstance(id: "sparky")
69+
#else
70+
weak var weakHeartbeatStorage: HeartbeatStorage? = .getInstance(id: "sparky")
71+
#endif
6872
XCTAssert(
6973
strongHeartbeatStorage === weakHeartbeatStorage,
7074
"Instances should reference the same object."

FirebaseStorage/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- [fixed] Fix "weak never mutated" build warning introduced in Xcode 26.2.
3+
14
# 12.0.0
25
- [removed] **Breaking change**: Removed the following unused API,
36
`StorageMetadata.storageReference`.

FirebaseStorage/Sources/StorageReference.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,11 @@ import Foundation
316316
var prefixes = [StorageReference]()
317317
var items = [StorageReference]()
318318

319-
weak var weakSelf = self
319+
#if swift(>=6.2)
320+
weak let weakSelf = self
321+
#else
322+
weak var weakSelf = self
323+
#endif
320324

321325
var paginatedCompletion: ((_: StorageListResult?, _: Error?) -> Void)?
322326
paginatedCompletion = { (_ listResult: StorageListResult?, _ error: Error?) in

scripts/build.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ else
173173
-destination "platform=iOS Simulator,name=${iphone_simulator_name}"
174174
)
175175
watchos_flags=(
176-
-destination 'platform=watchOS Simulator,name=Apple Watch Series 10 (42mm)'
176+
-destination 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)'
177177
)
178178
fi
179179

@@ -191,12 +191,19 @@ macos_flags=(
191191
tvos_flags=(
192192
-destination 'platform=tvOS Simulator,name=Apple TV'
193193
)
194-
visionos_flags=(
195-
# As of Aug 15, 2025, the default OS "latest" was failing as it matched both
196-
# the visionOS 26 beta and visionOS 2.5 (from Xcode 16.4) simulators;
197-
# explicitly specifying OS=2.5 in destination as a workaround.
198-
-destination 'platform=visionOS Simulator,OS=2.5,name=Apple Vision Pro'
199-
)
194+
if [[ "$xcode_major" -ge 26 ]]; then
195+
visionos_flags=(
196+
-destination 'platform=visionOS Simulator,OS=latest,name=Apple Vision Pro'
197+
)
198+
else
199+
# TODO(ncooke3): Remove this else case when we no longer need to test against macOS 15.
200+
visionos_flags=(
201+
# As of Aug 15, 2025, the default OS "latest" was failing as it matched both
202+
# the visionOS 26 beta and visionOS 2.5 (from Xcode 16.4) simulators;
203+
# explicitly specifying OS=2.5 in destination as a workaround.
204+
-destination 'platform=visionOS Simulator,OS=2.5,name=Apple Vision Pro'
205+
)
206+
fi
200207
catalyst_flags=(
201208
ARCHS=x86_64 VALID_ARCHS=x86_64 SUPPORTS_MACCATALYST=YES
202209
-destination platform="macOS,variant=Mac Catalyst,arch=x86_64" TARGETED_DEVICE_FAMILY=2

scripts/setup_quickstart.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,20 @@ update_spm_dependency() {
176176
*)
177177
# For PR testing, point to the current commit.
178178
local current_revision
179-
current_revision=$(git -C "$root_dir" rev-parse HEAD)
179+
180+
# Detect if we are in a PR or a regular push
181+
if [ "${GITHUB_EVENT_NAME:-}" == "pull_request" ]; then
182+
if ! command -v jq &> /dev/null; then
183+
echo "Error: jq is required for PR testing." >&2
184+
exit 1
185+
fi
186+
# In a PR, read the real commit SHA from the event payload
187+
# This guarantees a hash that exists on the remote server
188+
current_revision=$(jq -er .pull_request.head.sha "${GITHUB_EVENT_PATH}")
189+
else
190+
# In a Push (or local run), HEAD is safe to use
191+
current_revision=$(git -C "$root_dir" rev-parse HEAD)
192+
fi
180193
echo "Setting SPM dependency to current revision: ${current_revision}"
181194
"$scripts_dir/update_firebase_spm_dependency.sh" \
182195
"$absolute_project_file" --revision "$current_revision"

0 commit comments

Comments
 (0)