From ab82037ab91f045688dfe0123db9614cfee78c88 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 11:28:15 -0700 Subject: [PATCH 01/15] Build only spm testing for visionOS --- .github/workflows/abtesting.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index a1a50434bcc..b52818ddf8e 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -64,6 +64,7 @@ jobs: - os: macos-14 xcode: Xcode_15.2 target: visionOS + buildonly: buildonly runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -80,7 +81,7 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm + command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm${{ matrix.buiildonly }} catalyst: # Don't run on private repo unless it is a PR. From a308fbb1960a252e5f52d161ab66321c0382b945 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 11:45:22 -0700 Subject: [PATCH 02/15] see PR --- .github/workflows/abtesting.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index b52818ddf8e..d58765931aa 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -24,12 +24,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 @@ -53,18 +49,8 @@ jobs: max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-13, macos-14] - include: - - os: macos-14 - xcode: Xcode_15.3 - - os: macos-13 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.2 - - os: macos-14 - xcode: Xcode_15.2 - target: visionOS - buildonly: buildonly + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -81,7 +67,7 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm${{ matrix.buiildonly }} + command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm catalyst: # Don't run on private repo unless it is a PR. From e3023dc348f8153580b8056efb76b1137ff06497 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 11:48:03 -0700 Subject: [PATCH 03/15] missing bracket --- .github/workflows/abtesting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index d58765931aa..12dcac7a2fd 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -25,7 +25,7 @@ jobs: # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] os: [macos-14] - xcode: Xcode_15.2, Xcode_16] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 0f62826a2d12df9cedfb773926e12b95306e46f1 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 12:11:29 -0700 Subject: [PATCH 04/15] spm caching --- .github/workflows/abtesting.yml | 9 +++++++- .github/workflows/spm_package.yaml | 33 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/spm_package.yaml diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 12dcac7a2fd..90d94bc15ae 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -10,6 +10,10 @@ on: schedule: # Run every day at 1am(PST) - cron uses UTC times - cron: '0 9 * * *' + workflow_run: + workflows: [spm_package] + types: + - completed concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -46,7 +50,6 @@ jobs: # 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: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] os: [macos-14] @@ -54,6 +57,10 @@ jobs: 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}} - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 with: cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} diff --git a/.github/workflows/spm_package.yaml b/.github/workflows/spm_package.yaml new file mode 100644 index 00000000000..1f6334f12f4 --- /dev/null +++ b/.github/workflows/spm_package.yaml @@ -0,0 +1,33 @@ +name: spm_package + +on: + pull_request: + schedule: + # Run every day at 1am(PST) - cron uses UTC times + - cron: '0 9 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + 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: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} \ No newline at end of file From 173d8ea85fc3c70185b0ff7e39996bed5999abfb Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 12:19:27 -0700 Subject: [PATCH 05/15] Give up on cross workflow for now --- .github/workflows/abtesting.yml | 26 +++++++++++++++++++---- .github/workflows/spm_package.yaml | 33 ------------------------------ 2 files changed, 22 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/spm_package.yaml diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 90d94bc15ae..e6533a54143 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -10,10 +10,6 @@ on: schedule: # Run every day at 1am(PST) - cron uses UTC times - cron: '0 9 * * *' - workflow_run: - workflows: [spm_package] - types: - - completed concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -46,9 +42,31 @@ jobs: retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb FirebaseABTesting.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: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + 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] diff --git a/.github/workflows/spm_package.yaml b/.github/workflows/spm_package.yaml deleted file mode 100644 index 1f6334f12f4..00000000000 --- a/.github/workflows/spm_package.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: spm_package - -on: - pull_request: - schedule: - # Run every day at 1am(PST) - cron uses UTC times - - cron: '0 9 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - 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: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} \ No newline at end of file From 7c678398e3334304aca6d25c75559a8f240e62dd Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 12:26:56 -0700 Subject: [PATCH 06/15] Remove redundant caching --- .github/workflows/abtesting.yml | 3 --- scripts/setup_spm_tests.sh | 1 - 2 files changed, 4 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index e6533a54143..aecc4da9c2c 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -79,9 +79,6 @@ jobs: with: path: .build key: ${{needs.spm-package-resolved.outputs.cache_key}} - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/scripts/setup_spm_tests.sh b/scripts/setup_spm_tests.sh index 88771005172..0834c17b7bd 100755 --- a/scripts/setup_spm_tests.sh +++ b/scripts/setup_spm_tests.sh @@ -32,4 +32,3 @@ sed -i '' 's#exact:[[:space:]]*"[0-9.]*"#branch: "main"#' Package.swift mkdir -p .swiftpm/xcode/xcshareddata/xcschemes cp scripts/spm_test_schemes/* .swiftpm/xcode/xcshareddata/xcschemes/ -xcodebuild -list From 74d2d72546dbbb63addf51a511c2d8baa8438b4d Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 13:32:21 -0700 Subject: [PATCH 07/15] visionOS buildonly on macos-13 --- .github/workflows/abtesting.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index aecc4da9c2c..ebeda3bcd19 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -72,6 +72,11 @@ jobs: target: [iOS, tvOS, macOS, catalyst, watchOS] os: [macos-14] xcode: [Xcode_15.2, Xcode_16] + include: + - os: macos-13 + xcode: Xcode_15.2 + target: visionOS + spmbuildonly: buildonly runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -89,7 +94,7 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm + command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm${{ matrix.spmbuildonly }} catalyst: # Don't run on private repo unless it is a PR. From a9fca966de0949320d18469a6cf66fd98818b394 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 13:53:05 -0700 Subject: [PATCH 08/15] Revert "visionOS buildonly on macos-13" This reverts commit 74d2d72546dbbb63addf51a511c2d8baa8438b4d. --- .github/workflows/abtesting.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index ebeda3bcd19..aecc4da9c2c 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -72,11 +72,6 @@ jobs: target: [iOS, tvOS, macOS, catalyst, watchOS] os: [macos-14] xcode: [Xcode_15.2, Xcode_16] - include: - - os: macos-13 - xcode: Xcode_15.2 - target: visionOS - spmbuildonly: buildonly runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -94,7 +89,7 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm${{ matrix.spmbuildonly }} + command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm catalyst: # Don't run on private repo unless it is a PR. From c89780c5d66110c5369f8fcd9885925caddd36ca Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 14:00:01 -0700 Subject: [PATCH 09/15] checkpoint through auth --- .github/workflows/appdistribution.yml | 39 ++++++++++++++++++--------- .github/workflows/auth.yml | 29 +++++--------------- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index 072ee73b9f4..00b1c23e510 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -22,12 +22,8 @@ jobs: strategy: matrix: target: [ios] - 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,19 +37,36 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.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: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + + 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' 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 diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index ecdafa27904..6bbac256614 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -30,14 +30,8 @@ jobs: podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.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-14 - xcode: Xcode_15.3 - tests: --skip-tests - - os: macos-13 - xcode: Xcode_15.2 - tests: + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -103,21 +97,10 @@ jobs: # 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: - max-parallel: 1 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 + target: [iOS spm, tvOS spm, macOS spmbuildonly, catalyst spm, watchOS spm] + os: [macos-14] + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -134,7 +117,7 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} ${{ matrix.test }} + command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} catalyst: # Don't run on private repo unless it is a PR. From 6d7acc667125743ce70c0ca46142faa6a5c35f72 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 15:39:02 -0700 Subject: [PATCH 10/15] review and fixes for first three --- .github/workflows/abtesting.yml | 2 +- .github/workflows/appdistribution.yml | 8 ++-- .github/workflows/auth.yml | 58 +++++++++++++++++++++++++-- 3 files changed, 60 insertions(+), 8 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index aecc4da9c2c..278acd55dde 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} + key: ${{ steps.generate_cache_key.outputs.cache_key }} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index 00b1c23e510..aa56738bfa1 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -58,11 +58,10 @@ jobs: path: .build key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} - 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: os: [macos-14] @@ -70,9 +69,10 @@ jobs: 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: ${{ steps.generate_cache_key.outputs.cache_key }} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 6bbac256614..011cbc5d73d 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -42,7 +42,6 @@ jobs: run: scripts/configure_test_keychain.sh - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer -#TODO: Restore warnings check after resolution of #11693 - uses: nick-fields/retry@v3 with: timeout_minutes: 120 @@ -51,6 +50,36 @@ jobs: retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} + # TODO: Fix warnings on Xcode 16 and move into matrix above. + pod-lib-lint-xc16: + # 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: + podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec] + # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 + target: [ios, tvos, macos --skip-tests, watchos] + os: [macos-14] + xcode: [Xcode_16] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Configure test keychain + run: scripts/configure_test_keychain.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + 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' @@ -93,9 +122,31 @@ jobs: 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: + - 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 spm, tvOS spm, macOS spmbuildonly, catalyst spm, watchOS spm] @@ -104,9 +155,10 @@ jobs: 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: ${{ steps.generate_cache_key.outputs.cache_key }} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild From 6ea490fe1f42ceaf10ed54bcf685cd0306ee8b0e Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 15:56:41 -0700 Subject: [PATCH 11/15] fix key --- .github/workflows/abtesting.yml | 2 +- .github/workflows/appdistribution.yml | 2 +- .github/workflows/auth.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 278acd55dde..6b914e963f5 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} + key: ${{ steps.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/appdistribution.yml b/.github/workflows/appdistribution.yml index aa56738bfa1..8ecf6afebec 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -72,7 +72,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} + key: ${{ steps.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/auth.yml b/.github/workflows/auth.yml index 011cbc5d73d..0750644143b 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -158,7 +158,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} + key: ${{ steps.spm-package-resolved.outputs.cache_key }} - name: Xcode run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - name: Initialize xcodebuild From 5a48703d0905bdc9234e497b42cabca6d5e7a0d4 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 20:26:11 -0700 Subject: [PATCH 12/15] fixes --- .github/workflows/abtesting.yml | 2 +- .github/workflows/appdistribution.yml | 2 +- .github/workflows/auth.yml | 2 +- FirebaseAuth.podspec | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 6b914e963f5..aecc4da9c2c 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{ steps.spm-package-resolved.outputs.cache_key }} + 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/appdistribution.yml b/.github/workflows/appdistribution.yml index 8ecf6afebec..d44c7ad19a5 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -72,7 +72,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{ steps.spm-package-resolved.outputs.cache_key }} + 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/auth.yml b/.github/workflows/auth.yml index 0750644143b..4b7c9af6dfc 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -158,7 +158,7 @@ jobs: - uses: actions/cache/restore@v4 with: path: .build - key: ${{ steps.spm-package-resolved.outputs.cache_key }} + 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/FirebaseAuth.podspec b/FirebaseAuth.podspec index 5bb6a6b1eec..7c35e277736 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -48,11 +48,13 @@ supports email and password accounts, as well as several 3rd party authenticatio 'FirebaseAuth/README.md', 'FirebaseAuth/CHANGELOG.md' ] + # TODO(#13704) Restore warnings-as-errors checking. + # 'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('FIREBASE_CI') ? '-D FIREBASE_CI -warnings-as-errors' : ''}" s.pod_target_xcconfig = { 'GCC_C_LANGUAGE_STANDARD' => 'c99', # The second path is to find FirebaseAuth-Swift.h from a pod gen project 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" "${OBJECT_FILE_DIR_normal}/${NATIVE_ARCH_ACTUAL}"', - 'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('FIREBASE_CI') ? '-D FIREBASE_CI -warnings-as-errors' : ''}" + 'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('FIREBASE_CI') ? '-D FIREBASE_CI' : ''}" } s.framework = 'Security' s.ios.framework = 'SafariServices' From 34d9c0abed793f0d2c6802faddad02c95a63ebda Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 20:31:04 -0700 Subject: [PATCH 13/15] vertexai --- .github/workflows/vertexai.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/vertexai.yml b/.github/workflows/vertexai.yml index cc97d6bf32f..2e427be3bb7 100644 --- a/.github/workflows/vertexai.yml +++ b/.github/workflows/vertexai.yml @@ -41,11 +41,9 @@ jobs: spm-unit: strategy: matrix: - target: [iOS, macOS, catalyst, tvOS, visionOS, watchOS] + target: [iOS, tvOS, macOS, catalyst, watchOS] os: [macos-14] - include: - - os: macos-14 - xcode: Xcode_15.2 + xcode: [Xcode_15.2, Xcode_16] runs-on: ${{ matrix.os }} needs: spm-package-resolved env: From c4a821436dbcd50e978cb0b7deec43565ee6229d Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 07:15:34 -0700 Subject: [PATCH 14/15] review, auth fix, and action version updates --- .github/workflows/abtesting.yml | 4 ++-- .github/workflows/api_diff_report.yml | 2 +- .github/workflows/appdistribution.yml | 2 +- .github/workflows/auth.yml | 6 ++--- .github/workflows/check.yml | 4 ++-- .github/workflows/crashlytics.yml | 2 +- .github/workflows/dynamiclinks.yml | 2 +- .github/workflows/firestore-nightly.yml | 8 +++---- .github/workflows/firestore.yml | 22 +++++++++---------- .github/workflows/functions.yml | 2 +- .github/workflows/installations.yml | 2 +- .github/workflows/messaging.yml | 2 +- .github/workflows/performance.yml | 2 +- .github/workflows/remoteconfig.yml | 2 +- .github/workflows/storage.yml | 2 +- .../workflows/update-cpp-sdk-on-release.yml | 2 +- 16 files changed, 32 insertions(+), 34 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index aecc4da9c2c..00cb6e22b6b 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -61,7 +61,7 @@ jobs: id: cache with: path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: # Don't run on private repo unless it is a PR. @@ -146,7 +146,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/api_diff_report.yml b/.github/workflows/api_diff_report.yml index 8ca8c385b81..1e5f18a15b9 100644 --- a/.github/workflows/api_diff_report.yml +++ b/.github/workflows/api_diff_report.yml @@ -34,7 +34,7 @@ jobs: echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - name: Setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index d44c7ad19a5..1c34f2e97eb 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -56,7 +56,7 @@ jobs: id: cache with: path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 4b7c9af6dfc..74f49ff8d33 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -28,7 +28,6 @@ jobs: strategy: matrix: podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec] - # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] os: [macos-14] xcode: [Xcode_15.2, Xcode_16] @@ -58,8 +57,7 @@ jobs: strategy: matrix: podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec] - # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 - target: [ios, tvos, macos --skip-tests, watchos] + target: [ios, tvos, macos --skip-tests --allow-warnings, watchos] os: [macos-14] xcode: [Xcode_16] runs-on: ${{ matrix.os }} @@ -222,7 +220,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # - uses: ruby/setup-ruby@v1 - # - uses: actions/setup-python@v4 + # - uses: actions/setup-python@v5 # with: # python-version: '3.11' # - name: Setup quickstart diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 169ff7a2752..b2a6a56a984 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -21,12 +21,12 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 - name: Cache Mint packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.MINT_PATH }} key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index 2abf8a6736b..124e2121b8f 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -147,7 +147,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/dynamiclinks.yml b/.github/workflows/dynamiclinks.yml index 06b6d593664..589825221e8 100644 --- a/.github/workflows/dynamiclinks.yml +++ b/.github/workflows/dynamiclinks.yml @@ -121,7 +121,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/firestore-nightly.yml b/.github/workflows/firestore-nightly.yml index 98c73dbf322..dca4a833f19 100644 --- a/.github/workflows/firestore-nightly.yml +++ b/.github/workflows/firestore-nightly.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 @@ -55,7 +55,7 @@ jobs: - uses: actions/checkout@v3 - name: Prepare ccache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ runner.temp }}/ccache key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }} @@ -63,13 +63,13 @@ jobs: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}- - name: Cache Mint packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.MINT_PATH }} key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} restore-keys: ${{ runner.os }}-mint- - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.7' diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 4bf75ec6279..9bff2362ab1 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -86,7 +86,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 @@ -114,7 +114,7 @@ jobs: - uses: actions/checkout@v4 - name: Prepare ccache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ runner.temp }}/ccache key: firestore-ccache-${{ runner.os }}-${{ github.sha }} @@ -122,13 +122,13 @@ jobs: firestore-ccache-${{ runner.os }}- - name: Cache Mint packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.MINT_PATH }} key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} restore-keys: ${{ runner.os }}-mint- - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -164,7 +164,7 @@ jobs: - uses: actions/checkout@v4 - name: Prepare ccache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ runner.temp }}/ccache key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }} @@ -172,13 +172,13 @@ jobs: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}- - name: Cache Mint packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.MINT_PATH }} key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} restore-keys: ${{ runner.os }}-mint- - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -250,14 +250,14 @@ jobs: - uses: actions/checkout@v4 - name: Prepare ccache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ runner.temp }}/ccache key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }} restore-keys: | ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}- - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -296,14 +296,14 @@ jobs: - uses: actions/checkout@v3 - name: Prepare ccache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ runner.temp }}/ccache key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }} restore-keys: | ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}- - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.7' diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index db67ea823f4..32e9dffcb01 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -152,7 +152,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # - uses: ruby/setup-ruby@v1 - # - uses: actions/setup-python@v4 + # - uses: actions/setup-python@v5 # with: # python-version: '3.11' # - name: Setup quickstart diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 744e11c10a6..94e7c7831e0 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -126,7 +126,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 6aa8fdc0091..151166c5715 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -161,7 +161,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 059253fabfb..29aa3176bb6 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -104,7 +104,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 382068cd980..fe576403f5d 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -163,7 +163,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # - uses: ruby/setup-ruby@v1 - # - uses: actions/setup-python@v4 + # - uses: actions/setup-python@v5 # with: # python-version: '3.11' # - name: Setup quickstart diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 50fb4f7b2ef..1c1bb861e30 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -131,7 +131,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Setup quickstart diff --git a/.github/workflows/update-cpp-sdk-on-release.yml b/.github/workflows/update-cpp-sdk-on-release.yml index ac824cf4c53..192444ef9d0 100644 --- a/.github/workflows/update-cpp-sdk-on-release.yml +++ b/.github/workflows/update-cpp-sdk-on-release.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11 From fe2c5ecc442c5ff909db4625e164bfbe69e52fb5 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 24 Sep 2024 08:26:52 -0700 Subject: [PATCH 15/15] [skip-ci] rm duplicate extra job --- .github/workflows/auth.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 74f49ff8d33..6e6058dc0f3 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -30,7 +30,7 @@ jobs: podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec] target: [ios, tvos, macos --skip-tests, watchos] os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] + xcode: [Xcode_15.2] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4