From 00c9b71115523c76448c9ea65a80d834c185189a Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 09:17:41 -0700 Subject: [PATCH 1/6] CI updates for visionOS and Xcode 16: part 2 --- .github/workflows/core.yml | 47 +++++++++++------- .github/workflows/core_extension.yml | 8 +-- .github/workflows/core_internal.yml | 46 ++++++++++++------ .github/workflows/crashlytics.yml | 50 +++++++++++-------- .github/workflows/database.yml | 50 +++++++++++-------- .github/workflows/dynamiclinks.yml | 44 +++++++++++------ .github/workflows/firebase_app_check.yml | 45 +++++++++++------ .github/workflows/firestore.yml | 38 ++++++++++----- .github/workflows/functions.yml | 60 ++++++++++++++--------- .github/workflows/inappmessaging.yml | 44 +++++++++++------ .github/workflows/installations.yml | 47 +++++++++++------- .github/workflows/messaging.yml | 49 ++++++++++++------- .github/workflows/mlmodeldownloader.yml | 47 +++++++++++------- .github/workflows/performance.yml | 42 ++++++++++------ .github/workflows/remoteconfig.yml | 50 +++++++++++-------- .github/workflows/sessions.yml | 45 +++++++++++------ .github/workflows/shared-swift.yml | 47 +++++++++++------- .github/workflows/spm.yml | 62 ++++++++++++++++-------- .github/workflows/storage.yml | 53 ++++++++++++-------- 19 files changed, 556 insertions(+), 318 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index d4913b5a428..a3e99d24d20 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -22,12 +22,8 @@ jobs: matrix: # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -39,28 +35,43 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/core_extension.yml b/.github/workflows/core_extension.yml index 1afaa4bb3de..b728bbc3bff 100644 --- a/.github/workflows/core_extension.yml +++ b/.github/workflows/core_extension.yml @@ -20,12 +20,8 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index 916e4d2a6b0..239bcfe30a9 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -18,12 +18,8 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -35,25 +31,43 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - name: Xcode diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index 124e2121b8f..f2b6d3f2bf5 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -25,18 +25,12 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos --skip-tests] - os: [macos-14, macos-13] + os: [macos-14] flags: [ '--use-modular-headers', '' ] - include: - - os: macos-14 - xcode: Xcode_15.3 - tests: --skip-tests - - os: macos-13 - xcode: Xcode_15.2 - tests: + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -53,28 +47,44 @@ jobs: retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} ${{ matrix.flags }} + + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 4ff6742cfc2..3189581c44a 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -25,16 +25,9 @@ jobs: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' strategy: matrix: - # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - tests: --skip-tests - - os: macos-13 - xcode: Xcode_15.2 - tests: --test-specs=unit + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -64,28 +57,43 @@ jobs: # Only iOS to mitigate flakes. run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/dynamiclinks.yml b/.github/workflows/dynamiclinks.yml index 589825221e8..864f3bd735e 100644 --- a/.github/workflows/dynamiclinks.yml +++ b/.github/workflows/dynamiclinks.yml @@ -22,12 +22,8 @@ jobs: strategy: matrix: - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -39,24 +35,42 @@ jobs: - name: FirebaseDynamicLinks run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --allow-warnings + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/firebase_app_check.yml b/.github/workflows/firebase_app_check.yml index a4b03fe4a64..fc8cb95dec3 100644 --- a/.github/workflows/firebase_app_check.yml +++ b/.github/workflows/firebase_app_check.yml @@ -21,14 +21,9 @@ jobs: strategy: matrix: podspec: [FirebaseAppCheckInterop.podspec, FirebaseAppCheck.podspec] - # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] - os: [macos-14, macos-13] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -96,25 +91,43 @@ jobs: # TODO: Remove --allow-warnings when stabilized. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 1c684ee5c50..b5822e648c1 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -352,7 +352,7 @@ jobs: if: | (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || (github.event_name == 'pull_request') - runs-on: macos-13 + runs-on: macos-14 strategy: matrix: podspec: [ @@ -406,7 +406,7 @@ jobs: platforms: 'ios' include: - os: macos-14 - xcode: Xcode_15.3 + xcode: Xcode_16 - os: macos-13 xcode: Xcode_15.2 runs-on: ${{ matrix.os }} @@ -429,8 +429,29 @@ jobs: --allow-warnings \ --no-analyze + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key } + spm-source: - needs: check + needs: [check, spm-package-resolved] # Either a scheduled run from public repo, or a pull request with firestore changes. if: | (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || @@ -438,15 +459,8 @@ jobs: strategy: matrix: target: [iOS, tvOS, macOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} env: FIREBASE_SOURCE_FIRESTORE: 1 diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index 32e9dffcb01..31ebaa6136f 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -30,12 +30,8 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -52,24 +48,47 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec \ --test-specs=unit --platforms=${{ matrix.target }} + + spm-package-resolved: + runs-on: macos-14 + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm-integration: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: os: [macos-14] - include: - - os: macos-14 - xcode: Xcode_15.3 + xcode: Xcode_15.4 runs-on: ${{ matrix.os }} env: FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - name: Integration Test Server @@ -86,24 +105,19 @@ jobs: spm-unit: # Don't run on private repo. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + needs: [spm-package-resolved] strategy: matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 76eea952f23..a01a6de2894 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -24,12 +24,8 @@ jobs: strategy: matrix: podspec: [FirebaseInAppMessaging.podspec] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -66,24 +62,42 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 94e7c7831e0..7d7b076c39a 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -25,13 +25,13 @@ jobs: matrix: # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 test-specs: unit,integration - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 test-specs: unit runs-on: ${{ matrix.os }} steps: @@ -57,29 +57,42 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \ --platforms=${{ matrix.target }} --test-specs=--platforms=${{ matrix.test-specs }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: - # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 - target: [iOS, tvOS, macOS, watchOS, catalyst] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + target: [iOS, tvOS, macOS, catalyst, watchOS] + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 151166c5715..bd8e266f79f 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -29,7 +29,7 @@ jobs: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-13 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -59,13 +59,13 @@ jobs: matrix: podspec: [FirebaseMessagingInterop.podspec, FirebaseMessaging.podspec] target: [ios, tvos, macos --skip-tests, watchos --skip-tests] # skipping tests on mac because of keychain access - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 tests: --test-specs=unit - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 tests: --skip-tests runs-on: ${{ matrix.os }} steps: @@ -78,28 +78,43 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} ${{ matrix.tests }} --platforms=${{ matrix.target }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: - target: [iOS, watchOS, tvOS, macOS, catalyst] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + target: [iOS, tvOS, macOS, catalyst, watchOS] + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - name: Xcode diff --git a/.github/workflows/mlmodeldownloader.yml b/.github/workflows/mlmodeldownloader.yml index a0d2cd992cc..fd4077aead7 100644 --- a/.github/workflows/mlmodeldownloader.yml +++ b/.github/workflows/mlmodeldownloader.yml @@ -22,12 +22,8 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -70,27 +66,42 @@ jobs: - name: PodLibLint MLModelDownloader Cron run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 29aa3176bb6..fe0c9d273c2 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -55,12 +55,8 @@ jobs: strategy: matrix: target: [ios, tvos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -123,24 +119,42 @@ jobs: testapp_dir: quickstart-ios/build-for-testing test_type: "xctest" + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index fe576403f5d..e38bf04bcfc 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -58,20 +58,19 @@ jobs: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' strategy: - max-parallel: 1 matrix: # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] podspec: [FirebaseRemoteConfig.podspec] - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 # TODO(#13078): Fix testing infra to enforce warnings again. tests: --allow-warnings # Flaky tests on CI - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 tests: --skip-tests runs-on: ${{ matrix.os }} steps: @@ -86,30 +85,43 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} \ ${{ matrix.tests }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - test: spmbuildonly - - os: macos-14 - xcode: Xcode_15.3 - test: spmbuildonly - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS - test: spm + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild @@ -117,7 +129,7 @@ jobs: - name: Unit Tests run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} ${{ matrix.test }} - name: Fake Console tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} ${{ matrix.test }} + run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} catalyst: # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/sessions.yml b/.github/workflows/sessions.yml index a80387bab95..d05b0bef5d8 100644 --- a/.github/workflows/sessions.yml +++ b/.github/workflows/sessions.yml @@ -24,14 +24,14 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 tests: # Flaky tests on CI - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 tests: --skip-tests runs-on: ${{ matrix.os }} steps: @@ -49,28 +49,43 @@ jobs: retry_wait_seconds: 120 command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/shared-swift.yml b/.github/workflows/shared-swift.yml index 4b6ea4a12e1..e3811018d68 100644 --- a/.github/workflows/shared-swift.yml +++ b/.github/workflows/shared-swift.yml @@ -24,12 +24,8 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -41,28 +37,43 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/spm.yml b/.github/workflows/spm.yml index 5557f1b2865..7240cbf7c93 100644 --- a/.github/workflows/spm.yml +++ b/.github/workflows/spm.yml @@ -22,27 +22,48 @@ concurrency: cancel-in-progress: true jobs: + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + swift-build-run: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: - os: [macos-14, macos-13] + os: [macos-14] include: - # The integration tests are slow and flaky on Xcode 15, so just build. - - os: macos-13 - xcode: Xcode_15.2 - test: spmbuildonly + - os: macos-14 + xcode: Xcode_16 + test: spm - os: macos-14 xcode: Xcode_15.3 test: spm runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Clone mock responses for Vertex AI unit tests run: scripts/update_vertexai_responses.sh - name: Xcode @@ -63,20 +84,22 @@ jobs: iOS-Device: # 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' + needs: [spm-package-resolved] strategy: matrix: - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: device${{ matrix.os }}${{ matrix.xcode }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Clone mock responses for Vertex AI unit tests run: scripts/update_vertexai_responses.sh - name: Xcode @@ -89,25 +112,26 @@ jobs: platforms: # 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' - + needs: [spm-package-resolved] strategy: matrix: # Full set of Firebase-Package tests only run on iOS. Run subset on other platforms. # visionOS isn't buildable from here (even with Firestore source) because the test # targets need Analytics. target: [tvOS, macOS, catalyst] - os: [macos-13, macos-14] + os: [macos-14] include: - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 - os: macos-14 xcode: Xcode_15.3 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: platforms${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 1c1bb861e30..3882db1786b 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -25,7 +25,7 @@ jobs: language: [Swift, ObjC] include: - os: macos-14 - xcode: Xcode_15.3 + xcode: Xcode_15.4 env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} runs-on: ${{ matrix.os }} @@ -59,28 +59,43 @@ jobs: retry_wait_seconds: 120 command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + spm: # 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' + needs: [spm-package-resolved] strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-14 - xcode: Xcode_15.3 - target: visionOS + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + - uses: actions/cache/restore@v4 with: - cache_key: spm-cron${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcodes run: ls -l /Applications/Xcode* - name: Xcode @@ -156,13 +171,13 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 tests: --skip-tests - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 tests: --test-specs=unit runs-on: ${{ matrix.os }} steps: @@ -185,12 +200,12 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-13] + os: [macos-14] include: - os: macos-14 xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 + - os: macos-14 + xcode: Xcode_16 runs-on: ${{ matrix.os }} needs: pod-lib-lint steps: From d06a386b220a3daf16306248f4581a26a4a83289 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 10:31:16 -0700 Subject: [PATCH 2/6] Fixes --- .github/workflows/firestore.yml | 4 +++- .github/workflows/functions.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index b5822e648c1..f9b652c685d 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -431,6 +431,8 @@ jobs: spm-package-resolved: runs-on: macos-14 + env: + FIREBASE_SOURCE_FIRESTORE: 1 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} steps: @@ -448,7 +450,7 @@ jobs: id: cache with: path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key } + key: ${{ steps.generate_cache_key.outputs.cache_key }} spm-source: needs: [check, spm-package-resolved] diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index 31ebaa6136f..d4207217be3 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -79,7 +79,7 @@ jobs: strategy: matrix: os: [macos-14] - xcode: Xcode_15.4 + xcode: [Xcode_15.4] runs-on: ${{ matrix.os }} env: FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 From 54888f5e047941f154ae96cd7fc0158145e51a09 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 11:22:58 -0700 Subject: [PATCH 3/6] Run fewer flaky tests --- .github/workflows/messaging.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index bd8e266f79f..0703cfa56fa 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -105,7 +105,7 @@ jobs: needs: [spm-package-resolved] strategy: matrix: - target: [iOS, tvOS, macOS, catalyst, watchOS] + target: [iOS spm, tvOS spmbuildonly, macOS spmbuildonly, catalyst spmbuildonly, watchOS spmbuildonly] os: [macos-14] xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} @@ -120,7 +120,7 @@ jobs: - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm + run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} catalyst: # Don't run on private repo unless it is a PR. From d7144a5bf358c370ee4fd129aa9871edcefb843a Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 11:40:58 -0700 Subject: [PATCH 4/6] FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT --- .github/workflows/abtesting.yml | 2 + .github/workflows/appdistribution.yml | 2 + .github/workflows/auth.yml | 84 ++++++++++++------------ .github/workflows/core.yml | 2 + .github/workflows/core_internal.yml | 2 + .github/workflows/crashlytics.yml | 2 + .github/workflows/database.yml | 2 + .github/workflows/dynamiclinks.yml | 2 + .github/workflows/firebase_app_check.yml | 2 + .github/workflows/firestore.yml | 1 + .github/workflows/inappmessaging.yml | 2 + .github/workflows/installations.yml | 2 + .github/workflows/messaging.yml | 2 + .github/workflows/mlmodeldownloader.yml | 2 + .github/workflows/performance.yml | 2 + .github/workflows/remoteconfig.yml | 2 + .github/workflows/sessions.yml | 2 + .github/workflows/shared-swift.yml | 2 + .github/workflows/spm.yml | 2 + .github/workflows/storage.yml | 2 + 20 files changed, 80 insertions(+), 41 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 00cb6e22b6b..e16cb3ddb82 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -43,6 +43,8 @@ jobs: command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index 1c34f2e97eb..8c80ed4116c 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -38,6 +38,8 @@ jobs: --platforms=${{ matrix.target }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 6e6058dc0f3..e1f895070e9 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -78,50 +78,10 @@ jobs: retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} --allow-warnings - integration-tests: - # 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' - strategy: - matrix: - scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] - + spm-package-resolved: env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: integration-tests${{ matrix.os }} - - name: Install Secrets - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ - FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \ - FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ - FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ - FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ - FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ - FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \ - FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret" - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer - - uses: nick-fields/retry@v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }}) - - spm-package-resolved: - runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} steps: @@ -169,6 +129,48 @@ jobs: retry_wait_seconds: 120 command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} + integration-tests: + # 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' + strategy: + matrix: + scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} + - name: Install Secrets + run: | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ + FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \ + FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ + FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ + FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ + FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ + FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \ + FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret" + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }}) + 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' diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index a3e99d24d20..d8f420f2af3 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -36,6 +36,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index 239bcfe30a9..c1b38b07422 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -32,6 +32,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index f2b6d3f2bf5..ef4c0ba650c 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -49,6 +49,8 @@ jobs: spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 3189581c44a..b35c70200c9 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -58,6 +58,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/dynamiclinks.yml b/.github/workflows/dynamiclinks.yml index 864f3bd735e..4fcd9624616 100644 --- a/.github/workflows/dynamiclinks.yml +++ b/.github/workflows/dynamiclinks.yml @@ -36,6 +36,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --allow-warnings spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/firebase_app_check.yml b/.github/workflows/firebase_app_check.yml index fc8cb95dec3..d001709535a 100644 --- a/.github/workflows/firebase_app_check.yml +++ b/.github/workflows/firebase_app_check.yml @@ -92,6 +92,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index f9b652c685d..4c98182f859 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -432,6 +432,7 @@ jobs: spm-package-resolved: runs-on: macos-14 env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 FIREBASE_SOURCE_FIRESTORE: 1 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index a01a6de2894..c766fd89f31 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -63,6 +63,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 7d7b076c39a..5fe5174fa9a 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -58,6 +58,8 @@ jobs: --platforms=${{ matrix.target }} --test-specs=--platforms=${{ matrix.test-specs }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 0703cfa56fa..acc9d6d8c2c 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -79,6 +79,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} ${{ matrix.tests }} --platforms=${{ matrix.target }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/mlmodeldownloader.yml b/.github/workflows/mlmodeldownloader.yml index fd4077aead7..feae6c76383 100644 --- a/.github/workflows/mlmodeldownloader.yml +++ b/.github/workflows/mlmodeldownloader.yml @@ -67,6 +67,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index fe0c9d273c2..f58bb912a18 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -120,6 +120,8 @@ jobs: test_type: "xctest" spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index e38bf04bcfc..8d7342d5511 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -86,6 +86,8 @@ jobs: ${{ matrix.tests }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/sessions.yml b/.github/workflows/sessions.yml index d05b0bef5d8..c4edb685e1f 100644 --- a/.github/workflows/sessions.yml +++ b/.github/workflows/sessions.yml @@ -50,6 +50,8 @@ jobs: command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/shared-swift.yml b/.github/workflows/shared-swift.yml index e3811018d68..40f1d46fa19 100644 --- a/.github/workflows/shared-swift.yml +++ b/.github/workflows/shared-swift.yml @@ -38,6 +38,8 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/spm.yml b/.github/workflows/spm.yml index 7240cbf7c93..fec6410ca5d 100644 --- a/.github/workflows/spm.yml +++ b/.github/workflows/spm.yml @@ -23,6 +23,8 @@ concurrency: jobs: spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 3882db1786b..b93f4b9141d 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -60,6 +60,8 @@ jobs: command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-14 outputs: cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} From 9ba830c629768f0cb285f708530f51c255a1f611 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 12:08:39 -0700 Subject: [PATCH 5/6] fixes --- .github/workflows/auth.yml | 1 + .github/workflows/remoteconfig.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index e1f895070e9..e9169e19701 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -132,6 +132,7 @@ jobs: integration-tests: # 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' + needs: [spm-package-resolved] strategy: matrix: scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 8d7342d5511..98cf4d41a95 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -129,7 +129,7 @@ jobs: - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} ${{ matrix.test }} + run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm - name: Fake Console tests run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} From 02caf19d54758c7fd659de7e9fee93a7fb10e0a9 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 14:05:16 -0700 Subject: [PATCH 6/6] fixes --- .github/workflows/database.yml | 2 +- .github/workflows/remoteconfig.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index b35c70200c9..17b1db109e6 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -37,7 +37,7 @@ jobs: - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec ${{ matrix.tests }} --platforms=${{ matrix.target }} + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --test-specs=unit --platforms=${{ matrix.target }} integration: # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 98cf4d41a95..200c19801cf 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -131,7 +131,7 @@ jobs: - name: Unit Tests run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm - name: Fake Console tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} + run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} spm catalyst: # Don't run on private repo unless it is a PR.