Skip to content

[Infra] Migrate Storage CI to Xcode 16 #14657

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

Merged
merged 11 commits into from
Apr 11, 2025
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
35 changes: 27 additions & 8 deletions .github/workflows/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ jobs:
strategy:
matrix:
include:
- os: macos-13
xcode: Xcode_15.2
target: iOS
- os: macos-14
xcode: Xcode_15.4
xcode: Xcode_16.2
target: iOS
- os: macos-15
xcode: Xcode_16.2
Expand Down Expand Up @@ -132,6 +129,28 @@ jobs:
- name: Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm

catalyst:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
with:
cache_key: catalyst${{ matrix.os }}
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit

quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
Expand Down Expand Up @@ -169,7 +188,7 @@ jobs:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
LEGACY: true
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
Expand Down Expand Up @@ -199,8 +218,8 @@ jobs:
matrix:
target: [ios, tvos, macos, watchos]
build-env:
- os: macos-14
xcode: Xcode_15.3
- os: macos-15
xcode: Xcode_16.2
tests: --skip-tests
- os: macos-15
xcode: Xcode_16.2
Expand Down Expand Up @@ -228,7 +247,7 @@ jobs:
target: [ios, tvos, macos, watchos]
build-env:
- os: macos-14
xcode: Xcode_15.3
xcode: Xcode_16.2
- os: macos-15
xcode: Xcode_16.2
runs-on: ${{ matrix.build-env.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Foundation
import FirebaseAppCheckInterop
import FirebaseAuthInterop
import FirebaseCore
@_implementationOnly import FirebaseCoreExtension
internal import FirebaseCoreExtension

#if COCOAPODS
import GTMSessionFetcher
Expand Down
2 changes: 1 addition & 1 deletion FirebaseStorage/Sources/Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import FirebaseAuthInterop
import FirebaseCore

// Avoids exposing internal FirebaseCore APIs to Swift users.
@_implementationOnly import FirebaseCoreExtension
internal import FirebaseCoreExtension

/// Firebase Storage is a service that supports uploading and downloading binary objects,
/// such as images, videos, and other files to Google Cloud Storage. Instances of `Storage`
Expand Down
4 changes: 2 additions & 2 deletions FirebaseStorage/Sources/StorageUploadTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import Foundation

#if COCOAPODS
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#else
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#endif // COCOAPODS

#if COCOAPODS
Expand Down
9 changes: 7 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ function CheckUnexpectedFailures() {
fi
}

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

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

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