diff --git a/.github/workflows/_cocoapods.yml b/.github/workflows/_cocoapods.yml index 132db24a203..9e8778e2382 100644 --- a/.github/workflows/_cocoapods.yml +++ b/.github/workflows/_cocoapods.yml @@ -110,27 +110,37 @@ on: required: false default: "" - # The timeout (in minutes) for the linting to complete. Defaults to 15. + # The timeout (in minutes) for the linting to complete. Defaults to 20. timeout_minutes: type: number required: false - default: 15 + default: 20 jobs: pod-lib-lint: # Run on the main repo's scheduled jobs or pull requests and manual workflow invocations. if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name) strategy: + fail-fast: false matrix: - os: [macos-15] - xcode: [Xcode_16.4] + os: [macos-15, macos-26] + xcode: [Xcode_16.4, Xcode_26.1] platform: [iOS, tvOS, macOS, watchOS] + exclude: + - os: macos-15 + xcode: Xcode_26.1 + - os: macos-26 + xcode: Xcode_16.4 include: - os: macos-14 xcode: Xcode_16.2 platform: iOS runs-on: ${{ matrix.os }} steps: + - name: Skip, if applicable. + # Skip matrix combinations that weren't requested, while preserving the specific macos-14 / iOS inclusion. + if: contains(join(inputs.platforms), matrix.platform) == false && matrix.os != 'macos-14' + run: exit 0 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Setup Bundler @@ -142,6 +152,15 @@ jobs: command: scripts/setup_bundler.sh - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Install simulators in case they are missing. + if: matrix.platform != 'macOS' + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 120 + continue_on_error: true + command: xcodebuild -downloadPlatform ${{ matrix.platform }} - name: Set conditional environment variable, if needed. if: inputs.product == 'FirebaseAuth' run: echo "FIREBASE_CI=true" >> $GITHUB_ENV diff --git a/.github/workflows/_spm.yml b/.github/workflows/_spm.yml index 6343839f8ae..0b3f510cca5 100644 --- a/.github/workflows/_spm.yml +++ b/.github/workflows/_spm.yml @@ -95,17 +95,20 @@ jobs: env: FIREBASE_IS_NIGHTLY_TESTING: ${{ inputs.is_nightly && '1' || '' }} strategy: + fail-fast: false matrix: - os: [macos-15] - xcode: [Xcode_16.4] + os: [macos-15, macos-26] + xcode: [Xcode_16.4, Xcode_26.1] platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] + exclude: + - os: macos-15 + xcode: Xcode_26.1 + - os: macos-26 + xcode: Xcode_16.4 include: - os: macos-14 xcode: Xcode_16.2 platform: iOS - - os: macos-26 - xcode: Xcode_26.1 - platform: iOS runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -115,6 +118,15 @@ jobs: key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Install simulators in case they are missing. + if: matrix.platform != 'macOS' && matrix.platform != 'catalyst' + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 120 + continue_on_error: true + command: xcodebuild -downloadPlatform ${{ matrix.platform }} - name: Run setup command, if needed. if: inputs.setup_command != '' run: ${{ inputs.setup_command }} @@ -144,4 +156,5 @@ jobs: with: name: xcresults-${{ inputs.target }}-${{ matrix.platform }}-${{ matrix.os }}-${{ matrix.xcode }} path: xcresults/* - if-no-files-found: error + # If build did not succeed, then xcresult won't exist. Warn for visibility. + if-no-files-found: warn diff --git a/.github/workflows/sdk.ai.yml b/.github/workflows/sdk.ai.yml index e016b015869..d57ac7a0b47 100644 --- a/.github/workflows/sdk.ai.yml +++ b/.github/workflows/sdk.ai.yml @@ -96,5 +96,13 @@ jobs: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Install simulators in case they are missing. + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 120 + continue_on_error: true + command: xcodebuild -downloadPlatform iOS - name: Build Quickstart run: scripts/quickstart_build_spm.sh FirebaseAI diff --git a/.github/workflows/sdk.firestore.yml b/.github/workflows/sdk.firestore.yml index 0e04ed5ee06..33a5007731b 100644 --- a/.github/workflows/sdk.firestore.yml +++ b/.github/workflows/sdk.firestore.yml @@ -390,7 +390,7 @@ jobs: platforms: iOS allow_warnings: true analyze: false # TODO(#9565, b/227461966): Remove when absl is fixed. - timeout_minutes: 30 + timeout_minutes: 40 # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. pod-lib-lint-cron: diff --git a/Crashlytics/UnitTests/FIRCLSUserDefaultsTests.m b/Crashlytics/UnitTests/FIRCLSUserDefaultsTests.m index e310d85121c..4a06a6ee210 100644 --- a/Crashlytics/UnitTests/FIRCLSUserDefaultsTests.m +++ b/Crashlytics/UnitTests/FIRCLSUserDefaultsTests.m @@ -72,8 +72,6 @@ - (void)testDictionaryRepresentation { NSDictionary* testDict = [_userDefaults dictionaryRepresentation]; NSLog(@"%@", testDict); - NSLog(@"foooo"); - XCTAssertEqualObjects(testDict, expectedTestDict, @""); } diff --git a/scripts/build.sh b/scripts/build.sh index 171b15cb228..476dd19eb86 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -173,7 +173,7 @@ else -destination "platform=iOS Simulator,name=${iphone_simulator_name}" ) watchos_flags=( - -destination 'platform=watchOS Simulator,name=Apple Watch Series 10 (42mm)' + -destination 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)' ) fi @@ -191,12 +191,19 @@ macos_flags=( tvos_flags=( -destination 'platform=tvOS Simulator,name=Apple TV' ) -visionos_flags=( - # As of Aug 15, 2025, the default OS "latest" was failing as it matched both - # the visionOS 26 beta and visionOS 2.5 (from Xcode 16.4) simulators; - # explicitly specifying OS=2.5 in destination as a workaround. - -destination 'platform=visionOS Simulator,OS=2.5,name=Apple Vision Pro' -) +if [[ "$xcode_major" -ge 26 ]]; then + visionos_flags=( + -destination 'platform=visionOS Simulator,OS=latest,name=Apple Vision Pro' + ) +else + # TODO(ncooke3): Remove this else case when we no longer need to test against macOS 15. + visionos_flags=( + # As of Aug 15, 2025, the default OS "latest" was failing as it matched both + # the visionOS 26 beta and visionOS 2.5 (from Xcode 16.4) simulators; + # explicitly specifying OS=2.5 in destination as a workaround. + -destination 'platform=visionOS Simulator,OS=2.5,name=Apple Vision Pro' + ) +fi catalyst_flags=( ARCHS=x86_64 VALID_ARCHS=x86_64 SUPPORTS_MACCATALYST=YES -destination platform="macOS,variant=Mac Catalyst,arch=x86_64" TARGETED_DEVICE_FAMILY=2 diff --git a/scripts/setup_quickstart.sh b/scripts/setup_quickstart.sh index faf0224fec8..ed10c1c8003 100755 --- a/scripts/setup_quickstart.sh +++ b/scripts/setup_quickstart.sh @@ -176,7 +176,20 @@ update_spm_dependency() { *) # For PR testing, point to the current commit. local current_revision - current_revision=$(git -C "$root_dir" rev-parse HEAD) + + # Detect if we are in a PR or a regular push + if [ "${GITHUB_EVENT_NAME:-}" == "pull_request" ]; then + if ! command -v jq &> /dev/null; then + echo "Error: jq is required for PR testing." >&2 + exit 1 + fi + # In a PR, read the real commit SHA from the event payload + # This guarantees a hash that exists on the remote server + current_revision=$(jq -er .pull_request.head.sha "${GITHUB_EVENT_PATH}") + else + # In a Push (or local run), HEAD is safe to use + current_revision=$(git -C "$root_dir" rev-parse HEAD) + fi echo "Setting SPM dependency to current revision: ${current_revision}" "$scripts_dir/update_firebase_spm_dependency.sh" \ "$absolute_project_file" --revision "$current_revision"