From 97c2cb57db9000357f5aa88dc71e7127060038e0 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:46:42 -0400 Subject: [PATCH 01/11] [Infra] Require firestore status check only if firestore code changes --- .github/workflows/firestore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 4bf75ec6279..46260f05cdf 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -551,7 +551,7 @@ jobs: # to be used as a required check for merging. check-required-tests: runs-on: ubuntu-latest - if: always() + if: needs.changes.outputs.changed == 'true' name: Check all required Firestore tests results needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary] steps: From a66cdf3eec504281604a8f4d2f2b74f2c45b4d6d Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:27:23 -0400 Subject: [PATCH 02/11] debug --- .github/workflows/firestore.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 46260f05cdf..c5c4a8f305e 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -559,6 +559,13 @@ jobs: if: needs.cmake.result == 'failure' || needs.cmake-prod-db.result == 'failure' || needs.xcodebuild.result == 'failure' || needs.spm.result == 'failure' run: exit 1 + check-required-tests-2: + runs-on: ubuntu-latest + name: Check 222 + steps: + - name: Check test matrix + run: echo needs.changes.outputs.changed + # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept # Firebase UI 12 From daf057714a62a87c3802c7f2de74afa8d360a36c Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:28:24 -0400 Subject: [PATCH 03/11] max-parallel: 1 --- .github/workflows/firestore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index c5c4a8f305e..29b6f04b255 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -435,6 +435,7 @@ jobs: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') strategy: + max-parallel: 1 matrix: target: [iOS, tvOS, macOS] os: [macos-13, macos-14] From eef5d4bd3f283013027919a5a882e6b16fa72f17 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:40:25 -0400 Subject: [PATCH 04/11] Update firestore.yml --- .github/workflows/firestore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 29b6f04b255..8ba7fac5813 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -565,7 +565,7 @@ jobs: name: Check 222 steps: - name: Check test matrix - run: echo needs.changes.outputs.changed + run: echo ${{ needs.changes.outputs.changed }} # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept From 1b41acb9bcc429b121d1916d18e23d152b1dfafd Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:53:44 -0400 Subject: [PATCH 05/11] debugging --- .github/workflows/firestore.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 8ba7fac5813..9cfb52cf63a 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -562,10 +562,11 @@ jobs: check-required-tests-2: runs-on: ubuntu-latest + needs: changes name: Check 222 steps: - name: Check test matrix - run: echo ${{ needs.changes.outputs.changed }} + run: echo ${{ needs.changes.outputs.changed }}; echo ${{ needs.changes.outputs.changed }} == 'true' # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept From 1c3b82dd9970e7c8156f8bba03207b108784b89d Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:17:25 -0400 Subject: [PATCH 06/11] Update firestore.yml --- .github/workflows/firestore.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 9cfb52cf63a..bcca63673e6 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -321,7 +321,7 @@ jobs: # 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') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + (github.event_name == 'pull_request' && ) runs-on: macos-14 needs: check @@ -342,17 +342,18 @@ jobs: - name: Build and test run: | + echo {{ needs.changes.outputs.changed }} export EXPERIMENTAL_MODE=true scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild pod-lib-lint: + needs: check # 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') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + (github.event_name == 'pull_request') runs-on: macos-13 - needs: check strategy: matrix: podspec: [ @@ -430,10 +431,11 @@ jobs: --no-analyze spm-source: + needs: check # 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') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + (github.event_name == 'pull_request') strategy: max-parallel: 1 matrix: @@ -448,7 +450,6 @@ jobs: xcode: Xcode_15.3 target: visionOS runs-on: ${{ matrix.os }} - needs: check env: FIREBASE_SOURCE_FIRESTORE: 1 steps: @@ -464,12 +465,12 @@ jobs: run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly spm-binary: + needs: check # 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') || (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') runs-on: macos-14 - needs: check steps: - uses: actions/checkout@v4 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -552,23 +553,13 @@ jobs: # to be used as a required check for merging. check-required-tests: runs-on: ubuntu-latest - if: needs.changes.outputs.changed == 'true' name: Check all required Firestore tests results needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary] steps: - name: Check test matrix - if: needs.cmake.result == 'failure' || needs.cmake-prod-db.result == 'failure' || needs.xcodebuild.result == 'failure' || needs.spm.result == 'failure' + if: needs.*.result == 'failure' run: exit 1 - check-required-tests-2: - runs-on: ubuntu-latest - needs: changes - name: Check 222 - steps: - - name: Check test matrix - run: echo ${{ needs.changes.outputs.changed }}; echo ${{ needs.changes.outputs.changed }} == 'true' - - # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept # Firebase UI 12 # quickstart: From 0fafe014c66a215546191ccdb9e96eda751388c4 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:21:09 -0400 Subject: [PATCH 07/11] Update firestore.yml --- .github/workflows/firestore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index bcca63673e6..c81749c1843 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -321,7 +321,7 @@ jobs: # 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') || - (github.event_name == 'pull_request' && ) + (github.event_name == 'pull_request') runs-on: macos-14 needs: check From f47a94706eda0e8cb78ba214bc959bb4fb1050a5 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:01:14 -0400 Subject: [PATCH 08/11] Update .github/workflows/firestore.yml --- .github/workflows/firestore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index c81749c1843..83c67de1256 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -342,7 +342,7 @@ jobs: - name: Build and test run: | - echo {{ needs.changes.outputs.changed }} + echo ${{ needs.changes.outputs.changed }} export EXPERIMENTAL_MODE=true scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild From 7d98d084ddd18961212c58f486c9eda53773e7fd Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Sat, 21 Sep 2024 17:24:38 -0400 Subject: [PATCH 09/11] Update .github/workflows/firestore.yml --- .github/workflows/firestore.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 83c67de1256..33cae67e75f 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -342,7 +342,6 @@ jobs: - name: Build and test run: | - echo ${{ needs.changes.outputs.changed }} export EXPERIMENTAL_MODE=true scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild From da61d486d4a2b2c126a8fd9a9e8d9c80a84677d7 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:14:24 -0400 Subject: [PATCH 10/11] Update firestore.yml --- .github/workflows/firestore.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 33cae67e75f..8e4a241317b 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -143,11 +143,11 @@ jobs: cmake-prod-db: + needs: check # 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') || (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - needs: check strategy: matrix: @@ -230,11 +230,11 @@ jobs: sanitizers-mac: + needs: check # 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') || (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - needs: check strategy: matrix: @@ -272,11 +272,11 @@ jobs: sanitizers-ubuntu: + needs: check # 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') || (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - needs: check strategy: matrix: @@ -318,12 +318,12 @@ jobs: xcodebuild: + needs: check # 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') || (github.event_name == 'pull_request') runs-on: macos-14 - needs: check strategy: matrix: @@ -379,8 +379,8 @@ jobs: # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. pod-lib-lint-cron: - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' needs: check + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' strategy: matrix: podspec: [ @@ -481,12 +481,12 @@ jobs: run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly check-firestore-internal-public-headers: + needs: check # 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') || (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') runs-on: macos-14 - needs: check steps: - uses: actions/checkout@v4 - name: Assert that Firestore and FirestoreInternal have identically named headers. From e45073570831fc573ee07eb1e24ede47604ad4a4 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:48:40 -0400 Subject: [PATCH 11/11] Update .github/workflows/firestore.yml --- .github/workflows/firestore.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 8e4a241317b..67de61782b1 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -436,7 +436,6 @@ jobs: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || (github.event_name == 'pull_request') strategy: - max-parallel: 1 matrix: target: [iOS, tvOS, macOS] os: [macos-13, macos-14]