Skip to content

Commit 99c1466

Browse files
authored
[Infra] Migrate Storage CI to Xcode 16 (#14657)
1 parent 8a75a45 commit 99c1466

File tree

5 files changed

+38
-14
lines changed

5 files changed

+38
-14
lines changed

.github/workflows/storage.yml

+27-8
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ jobs:
9090
strategy:
9191
matrix:
9292
include:
93-
- os: macos-13
94-
xcode: Xcode_15.2
95-
target: iOS
9693
- os: macos-14
97-
xcode: Xcode_15.4
94+
xcode: Xcode_16.2
9895
target: iOS
9996
- os: macos-15
10097
xcode: Xcode_16.2
@@ -133,6 +130,28 @@ jobs:
133130
- name: Unit Tests
134131
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm
135132

133+
catalyst:
134+
# Don't run on private repo unless it is a PR.
135+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
136+
runs-on: macos-15
137+
steps:
138+
- uses: actions/checkout@v4
139+
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
140+
with:
141+
cache_key: catalyst${{ matrix.os }}
142+
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
143+
- name: Setup Bundler
144+
run: scripts/setup_bundler.sh
145+
- name: Xcode
146+
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
147+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
148+
with:
149+
timeout_minutes: 120
150+
max_attempts: 3
151+
retry_on: error
152+
retry_wait_seconds: 120
153+
command: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit
154+
136155
quickstart:
137156
# Don't run on private repo unless it is a PR.
138157
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
@@ -170,7 +189,7 @@ jobs:
170189
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
171190
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
172191
LEGACY: true
173-
runs-on: macos-14
192+
runs-on: macos-15
174193
steps:
175194
- uses: actions/checkout@v4
176195
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
@@ -200,8 +219,8 @@ jobs:
200219
matrix:
201220
target: [ios, tvos, macos, watchos]
202221
build-env:
203-
- os: macos-14
204-
xcode: Xcode_15.3
222+
- os: macos-15
223+
xcode: Xcode_16.2
205224
tests: --skip-tests
206225
- os: macos-15
207226
xcode: Xcode_16.2
@@ -229,7 +248,7 @@ jobs:
229248
target: [ios, tvos, macos, watchos]
230249
build-env:
231250
- os: macos-14
232-
xcode: Xcode_15.3
251+
xcode: Xcode_16.2
233252
- os: macos-15
234253
xcode: Xcode_16.2
235254
runs-on: ${{ matrix.build-env.os }}

FirebaseStorage/Sources/Internal/StorageTokenAuthorizer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Foundation
1717
import FirebaseAppCheckInterop
1818
import FirebaseAuthInterop
1919
import FirebaseCore
20-
@_implementationOnly import FirebaseCoreExtension
20+
internal import FirebaseCoreExtension
2121

2222
#if COCOAPODS
2323
import GTMSessionFetcher

FirebaseStorage/Sources/Storage.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import FirebaseAuthInterop
1919
import FirebaseCore
2020

2121
// Avoids exposing internal FirebaseCore APIs to Swift users.
22-
@_implementationOnly import FirebaseCoreExtension
22+
internal import FirebaseCoreExtension
2323

2424
/// Firebase Storage is a service that supports uploading and downloading binary objects,
2525
/// such as images, videos, and other files to Google Cloud Storage. Instances of `Storage`

FirebaseStorage/Sources/StorageUploadTask.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import Foundation
1616

1717
#if COCOAPODS
18-
@_implementationOnly import GoogleUtilities
18+
internal import GoogleUtilities
1919
#else
20-
@_implementationOnly import GoogleUtilities_Environment
20+
internal import GoogleUtilities_Environment
2121
#endif // COCOAPODS
2222

2323
#if COCOAPODS

scripts/build.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ function CheckUnexpectedFailures() {
151151
fi
152152
}
153153

154+
# TODO(ncooke3): Xcode 16 – remove -lt 15 after migration
154155
if [[ "$xcode_major" -lt 15 ]]; then
155156
ios_flags=(
156157
-sdk 'iphonesimulator'
@@ -572,10 +573,12 @@ case "$product-$platform-$method" in
572573

573574
if check_secrets; then
574575
# Integration tests are only run on iOS to minimize flake failures.
576+
# TODO(ncooke3): Add back "${ios_flags[@]}". See #14657.
575577
RunXcodebuild \
576578
-workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
577579
-scheme "FirebaseStorage-Unit-integration" \
578-
"${ios_flags[@]}" \
580+
-sdk 'iphonesimulator' \
581+
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.3.1' \
579582
"${xcb_flags[@]}" \
580583
test
581584
fi
@@ -591,10 +594,12 @@ case "$product-$platform-$method" in
591594

592595
if check_secrets; then
593596
# Integration tests are only run on iOS to minimize flake failures.
597+
# TODO(ncooke3): Add back "${ios_flags[@]}". See #14657.
594598
RunXcodebuild \
595599
-workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
596600
-scheme "FirebaseStorage-Unit-ObjCIntegration" \
597-
"${ios_flags[@]}" \
601+
-sdk 'iphonesimulator' \
602+
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.3.1' \
598603
"${xcb_flags[@]}" \
599604
test
600605
fi

0 commit comments

Comments
 (0)