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
11 changes: 6 additions & 5 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ jobs:
flutter pub add $FLUTTER_DEPENDENCIES
cd ../../../..
- name: 'Swift Integration Setup'
run: flutter config --enable-swift-package-manager
run: |
flutter config --enable-swift-package-manager
./.github/workflows/scripts/link-example-plugin-package-deps.sh packages/firebase_core/firebase_core/example ios
- name: 'Build iOS App with Swift Package Manager'
run: |
dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart
Expand Down Expand Up @@ -236,11 +238,10 @@ jobs:
flutter pub add $FLUTTER_DEPENDENCIES
cd ../../../..
- name: 'Swift Integration Setup'
run: flutter config --enable-swift-package-manager
run: |
flutter config --enable-swift-package-manager
./.github/workflows/scripts/link-example-plugin-package-deps.sh packages/firebase_core/firebase_core/example macos
- name: 'Build macOS App with Swift Package Manager'
# The script drops firebase_messaging from the example app before the
# macOS build; with iOS in its own job that no longer has to happen
# after a successful iOS build in the same checkout.
run: |
dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart
dart ./.github/workflows/scripts/swift-integration.dart --platform=macos $FLUTTER_DEPENDENCIES
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/e2e_tests_auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ jobs:
# FIRInstallations aborts on at launch.
native-config-args: '--live-tier-plist=auth'
inject-config-secrets: true
# Firebase Apple SDK 13 needs app-check 12, and every GoogleSignIn-iOS
# release (8.0.0 to 10.0.0) needs app-check 11, so the example's
# google_sign_in cannot resolve under SPM. CocoaPods is still on 12.19.0.
# Rejoin SPM once https://github.com/google/GoogleSignIn-iOS/pull/626
# ships and google_sign_in_ios accepts that release.
ios-spm: false
nightly_test_mode: ${{ inputs.nightly_test_mode == true }}
secrets:
TESTS_E2E_FIREBASE_OPTIONS_DART: ${{ secrets.TESTS_E2E_FIREBASE_OPTIONS_DART }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/e2e_tests_crashlytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-crashlytics
cancel-in-progress: true

# Deliberately CocoaPods on iOS as well as macOS: the example's Xcode project
# runs `"${PODS_ROOT}/FirebaseCrashlytics/run"` as a build phase, and PODS_ROOT
# does not exist under Swift Package Manager.
#
# Thin caller: one job per platform this product supports, each delegating
# to the matching `reusable_e2e_<platform>.yaml`. Platforms the product does
# not support have no job here, so they render no check at all.
Expand Down Expand Up @@ -77,7 +73,6 @@ jobs:
package-path: 'packages/firebase_crashlytics/firebase_crashlytics'
package-scope: 'firebase_crashlytics*'
cache-key-suffix: 'crashlytics'
ios-spm: false
native-config-args: '--live-tier-plist=crashlytics'
inject-config-secrets: true
use-firebase-emulators: false
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/e2e_tests_fdc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ jobs:
npm-cache: 'false'
firebase-tools-version: '15.25.1'
bootstrap-scope: 'firebase_data_connect*'
- name: Enable Swift Package Manager
# The example's pubspec also pins this; there is no Podfile.
run: flutter config --enable-swift-package-manager
- name: Setup PostgreSQL for Linux/macOS/Windows
uses: ikalnytskyi/action-setup-postgres@c4dda34aae1c821e3a771b68b73b13af3198a7ee
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d
Expand All @@ -143,18 +146,6 @@ jobs:
key: xcode-cache-${{ runner.os }}-xcode27
save: "${{ github.ref == 'refs/heads/main' }}"
max-size: 700M
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
continue-on-error: true
name: Pods Cache
id: pods-cache
with:
# Must match the save path exactly
path: packages/firebase_data_connect/firebase_data_connect/example/ios/Pods
# tests/pubspec.lock is gitignored, so the old key hashed nothing and
# the cache never invalidated. Key on the files that actually pin the
# native SDK version instead.
key: ${{ runner.os }}-fdc-pods-v3-${{ hashFiles('packages/firebase_data_connect/firebase_data_connect/example/ios/Podfile', 'packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb') }}
restore-keys: ${{ runner.os }}-fdc-pods-v3-
- name: Firebase Emulator Cache
id: firebase-emulator-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
Expand All @@ -174,8 +165,26 @@ jobs:
export CCACHE_DEPEND=true
export CCACHE_INODECACHE=true
ccache -s
flutter build ios --no-codesign --simulator --debug --target=./integration_test/e2e_test.dart --dart-define=CI=true
set +e
flutter build ios --no-codesign --simulator --debug --target=./integration_test/e2e_test.dart --dart-define=CI=true 2>&1 | tee build_output.log
BUILD_EXIT=${PIPESTATUS[0]}
# Same one-shot retry for the SPM package resolution race as
# reusable_e2e_ios.yaml - anything else fails immediately.
if [ "$BUILD_EXIT" -ne 0 ] && grep -q "Could not resolve package dependencies" build_output.log; then
echo "SPM package resolution race detected; retrying the build once."
flutter clean > /dev/null
flutter build ios --no-codesign --simulator --debug --target=./integration_test/e2e_test.dart --dart-define=CI=true 2>&1 | tee build_output.log
BUILD_EXIT=${PIPESTATUS[0]}
fi
set -e
ccache -s
# Flutter silently falls back to CocoaPods when the example has a
# Podfile or a plugin has no Package.swift.
if grep -q "Running pod install" build_output.log; then
echo "::error::flutter build ran pod install: this example must build with Swift Package Manager only."
exit 1
fi
exit "$BUILD_EXIT"
- name: Start Firebase Emulator
run: |
sudo chown -R 501:20 "/Users/runner/.npm"
Expand Down Expand Up @@ -217,15 +226,6 @@ jobs:
key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }}
# Must match the restore path exactly
path: ~/.cache/firebase/emulators
- name: Save Pods Cache
# Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache.
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
continue-on-error: true
with:
key: ${{ steps.pods-cache.outputs.cache-primary-key }}
# Must match the restore path exactly
path: packages/firebase_data_connect/firebase_data_connect/example/ios/Pods

web:
runs-on: macos-latest
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/e2e_tests_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ jobs:
package-path: 'packages/cloud_functions/cloud_functions'
package-scope: 'cloud_functions*'
cache-key-suffix: 'functions'
# CocoaPods for now: Flutter's experimental SPM integration kept failing
# to resolve this example's plugin siblings ("Could not resolve package
# dependencies ... ios/firebase_core does not exist"). Dropping the Xcode
# 26.2 pin (see `reusable_e2e_ios.yaml`) is the likely fix, but one
# variable at a time - these two rejoin SPM once the default-Xcode runs
# prove clean. iOS SPM coverage is unaffected meanwhile: storage,
# database and firestore still build under it.
ios-spm: false
native-config-args: '--functions-native'
nightly_test_mode: ${{ inputs.nightly_test_mode == true }}

Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/e2e_tests_performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,6 @@ jobs:
package-path: 'packages/firebase_performance/firebase_performance'
package-scope: 'firebase_performance*'
cache-key-suffix: 'performance'
# CocoaPods for now: Flutter's experimental SPM integration kept failing
# to resolve this example's plugin siblings ("Could not resolve package
# dependencies ... ios/firebase_core does not exist"). Dropping the Xcode
# 26.2 pin (see `reusable_e2e_ios.yaml`) is the likely fix, but one
# variable at a time - these two rejoin SPM once the default-Xcode runs
# prove clean. iOS SPM coverage is unaffected meanwhile: storage,
# database and firestore still build under it.
ios-spm: false
native-config-args: '--live-tier-plist=performance'
inject-config-secrets: true
use-firebase-emulators: false
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/e2e_tests_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,14 @@ jobs:
# symlink farm; the image-default Xcode resolves it fine, as the
# e2e-firestore SPM job proves every run.
run: flutter config --enable-swift-package-manager
- name: Prepare iOS project for Swift Package Manager
# The committed Podfile is what CocoaPods users of the example rely
# on, and `flutter build` prefers CocoaPods whenever one is present.
working-directory: packages/cloud_firestore/cloud_firestore/pipeline_example/ios
run: |
if [ -f Podfile ]; then pod deintegrate; fi
rm -f Podfile Podfile.lock
rm -rf Pods
- uses: futureware-tech/simulator-action@e89aa8f93d3aec35083ff49d2854d07f7186f7f5
id: simulator
with:
# https://github.com/actions/runner-images/blob/main/images/macos/xcode-27-arm64-Readme.md#installed-simulators
model: "iPhone 17"
- name: Link the example plugin's Swift package dependencies
# Keeps the plugin's local package override resolvable; see the script.
run: ./.github/workflows/scripts/link-example-plugin-package-deps.sh packages/cloud_firestore/cloud_firestore/pipeline_example ios
- name: Build iOS (simulator)
working-directory: packages/cloud_firestore/cloud_firestore/pipeline_example
# A cold SwiftPM fetch (grpc/abseil binaries) plus the Xcode build has
Expand All @@ -225,8 +220,15 @@ jobs:
cat build_output.log
if [ $BUILD_EXIT -ne 0 ] && grep -q "Could not resolve package dependencies" build_output.log; then
echo "SPM package resolution race detected; retrying the build once."
flutter build ios --no-codesign --simulator --debug --target=./integration_test/pipeline/pipeline_live_test.dart --dart-define=CI=true
flutter build ios --no-codesign --simulator --debug --target=./integration_test/pipeline/pipeline_live_test.dart --dart-define=CI=true > build_output.log 2>&1
BUILD_EXIT=$?
cat build_output.log
fi
# Flutter silently falls back to CocoaPods when the example has a
# Podfile or a plugin has no Package.swift.
if grep -q "Running pod install" build_output.log; then
echo "::error::flutter build ran pod install: this example must build with Swift Package Manager only."
exit 1
fi
exit $BUILD_EXIT
- name: Ensure Simulator Ready
Expand Down
96 changes: 44 additions & 52 deletions .github/workflows/e2e_tests_smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,9 @@ jobs:
with:
firebase-tools-version: '15.25.1'
bootstrap-scope: tests
- name: Disable Swift Package Manager
# Recent stable Flutter enables SPM by default; the smoke app's Apple
# builds are CocoaPods by design (tests/ios, tests/macos Podfiles).
run: flutter config --no-enable-swift-package-manager
- name: Enable Swift Package Manager
# tests/pubspec.yaml also pins this; there is no Podfile.
run: flutter config --enable-swift-package-manager
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d
name: Xcode Compile Cache
with:
Expand All @@ -223,18 +222,6 @@ jobs:
key: xcode-ccache-ios-xcode27
save: "${{ github.ref == 'refs/heads/main' }}"
max-size: 700M
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
continue-on-error: true
name: Pods Cache
id: pods-cache
with:
# Must match the save path exactly
path: tests/ios/Pods
# Keyed on the Podfile and the pinned Firebase SDK version, not tests/pubspec.lock:
# that file is gitignored, so hashFiles() returned an empty string and the key
# never changed - the cache could never be invalidated.
key: pods-v5-${{ runner.os }}-ios-${{ hashFiles('tests/ios/Podfile', 'packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb') }}
restore-keys: pods-v5-${{ runner.os }}-ios-
- name: Firebase Emulator Cache
id: firebase-emulator-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
Expand All @@ -259,8 +246,26 @@ jobs:
export CCACHE_DEPEND=true
export CCACHE_INODECACHE=true
ccache -s
flutter build ios --no-codesign --simulator --debug --target=./integration_test/core_shard_test.dart --dart-define=CI=true
set +e
flutter build ios --no-codesign --simulator --debug --target=./integration_test/core_shard_test.dart --dart-define=CI=true 2>&1 | tee build_output.log
BUILD_EXIT=${PIPESTATUS[0]}
# Same one-shot retry for the SPM package resolution race as
# reusable_e2e_ios.yaml - anything else fails immediately.
if [ "$BUILD_EXIT" -ne 0 ] && grep -q "Could not resolve package dependencies" build_output.log; then
echo "SPM package resolution race detected; retrying the build once."
flutter clean > /dev/null
flutter build ios --no-codesign --simulator --debug --target=./integration_test/core_shard_test.dart --dart-define=CI=true 2>&1 | tee build_output.log
BUILD_EXIT=${PIPESTATUS[0]}
fi
set -e
ccache -s
# Flutter silently falls back to CocoaPods when the app has a Podfile
# or a plugin has no Package.swift.
if grep -q "Running pod install" build_output.log; then
echo "::error::flutter build ran pod install: the smoke app must build with Swift Package Manager only."
exit 1
fi
exit "$BUILD_EXIT"
- name: Install Cloud Functions dependencies
# `firebase emulators:exec` does not install these itself (the old
# start-firebase-emulator.sh wrapper did); without them the functions
Expand Down Expand Up @@ -308,15 +313,6 @@ jobs:
key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }}
# Must match the restore paths exactly
path: ~/.cache/firebase/emulators
- name: Save Pods Cache
# Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache.
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
continue-on-error: true
with:
key: ${{ steps.pods-cache.outputs.cache-primary-key }}
# Must match the restore paths exactly
path: tests/ios/Pods

macos:
needs: changes
Expand All @@ -331,10 +327,9 @@ jobs:
with:
firebase-tools-version: '15.25.1'
bootstrap-scope: tests
- name: Disable Swift Package Manager
# Recent stable Flutter enables SPM by default; the smoke app's Apple
# builds are CocoaPods by design (tests/ios, tests/macos Podfiles).
run: flutter config --no-enable-swift-package-manager
- name: Enable Swift Package Manager
# tests/pubspec.yaml also pins this; there is no Podfile.
run: flutter config --enable-swift-package-manager
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d
name: Xcode Compile Cache
with:
Expand All @@ -343,18 +338,6 @@ jobs:
key: xcode-ccache-macos-xcode27
save: "${{ github.ref == 'refs/heads/main' }}"
max-size: 700M
- name: Pods Cache
continue-on-error: true
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
id: pods-cache
with:
# Must match the save path exactly
path: tests/macos/Pods
# Keyed on the Podfile and the pinned Firebase SDK version, not tests/pubspec.lock:
# that file is gitignored, so hashFiles() returned an empty string and the key
# never changed - the cache could never be invalidated.
key: pods-v5-${{ runner.os }}-macos-${{ hashFiles('tests/macos/Podfile', 'packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb') }}
restore-keys: pods-v5-${{ runner.os }}-macos-
- name: Firebase Emulator Cache
id: firebase-emulator-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
Expand All @@ -379,8 +362,26 @@ jobs:
export CCACHE_DEPEND=true
export CCACHE_INODECACHE=true
ccache -s
flutter build macos --debug --target=./integration_test/core_shard_test.dart --device-id=macos --dart-define=CI=true
set +e
flutter build macos --debug --target=./integration_test/core_shard_test.dart --device-id=macos --dart-define=CI=true 2>&1 | tee build_output.log
BUILD_EXIT=${PIPESTATUS[0]}
# Same one-shot retry for the SPM package resolution race as
# reusable_e2e_ios.yaml - anything else fails immediately.
if [ "$BUILD_EXIT" -ne 0 ] && grep -q "Could not resolve package dependencies" build_output.log; then
echo "SPM package resolution race detected; retrying the build once."
flutter clean > /dev/null
flutter build macos --debug --target=./integration_test/core_shard_test.dart --device-id=macos --dart-define=CI=true 2>&1 | tee build_output.log
BUILD_EXIT=${PIPESTATUS[0]}
fi
set -e
ccache -s
# Flutter silently falls back to CocoaPods when the app has a Podfile
# or a plugin has no Package.swift.
if grep -q "Running pod install" build_output.log; then
echo "::error::flutter build ran pod install: the smoke app must build with Swift Package Manager only."
exit 1
fi
exit "$BUILD_EXIT"
- name: Install Cloud Functions dependencies
# `firebase emulators:exec` does not install these itself (the old
# start-firebase-emulator.sh wrapper did); without them the functions
Expand Down Expand Up @@ -440,15 +441,6 @@ jobs:
key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }}
# Must match the restore path exactly
path: ~/.cache/firebase/emulators
- name: Save Pods Cache
continue-on-error: true
# Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache.
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
key: ${{ steps.pods-cache.outputs.cache-primary-key }}
# Must match the restore paths exactly
path: tests/macos/Pods

web:
needs: changes
Expand Down
Loading
Loading