From 3d19602ca3e72faa40433ee4d06073fd83007111 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 12:44:49 -0400 Subject: [PATCH 1/4] Break up steps into separate jobs to reduce build artifact collisions --- .github/workflows/firestore.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index fb0169a8aec..4c05bea9db4 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -316,13 +316,15 @@ jobs: --allow-warnings \ --no-analyze - spm: + spm-source: # 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-12 needs: check + env: + FIREBASE_SOURCE_FIRESTORE: 1 steps: - uses: actions/checkout@v3 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -330,12 +332,27 @@ jobs: cache_key: ${{ matrix.os }} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - - name: iOS Build Test – Binary + - name: iOS Build Test run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly - - name: iOS Build Test – Source + - name: Swift Build + run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly + + spm-binary: + # 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-12 + needs: check + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - name: iOS Build Test run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly - env: - FIREBASE_SOURCE_FIRESTORE: 1 - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly From 77a17efe4e26395e65350aa04330ef1c9d916574 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:29:31 -0400 Subject: [PATCH 2/4] Break up SPM cron steps into jobs --- .github/workflows/firestore.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 4c05bea9db4..5bde613391f 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -356,7 +356,29 @@ jobs: - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly - spm-cron: + # TODO: Re-enable either in or after #11706. + # spm-source-cron: + # # Don't run on private repo. + # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + # runs-on: macos-12 + # strategy: + # matrix: + # target: [tvOS, macOS, catalyst] + # env: + # FIREBASE_SOURCE_FIRESTORE: 1 + # steps: + # - uses: actions/checkout@v3 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: ${{ matrix.os }} + # - name: Initialize xcodebuild + # run: scripts/setup_spm_tests.sh + # - name: Build Test - Binary + # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly + # - name: Swift Build + # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly + +spm-binary-cron: # Don't run on private repo. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' runs-on: macos-12 @@ -372,11 +394,6 @@ jobs: run: scripts/setup_spm_tests.sh - name: Build Test - Binary run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly - # TODO: Re-enable either in or after #11706. - # - name: Build Test – Source - # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly - # env: - # FIREBASE_SOURCE_FIRESTORE: 1 - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly From c4f0c868e1acbc27357cc9146219974934f368c6 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 15 Sep 2023 13:42:40 -0400 Subject: [PATCH 3/4] Fix spacing --- .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 5bde613391f..01a57bcdde5 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -378,7 +378,7 @@ jobs: # - name: Swift Build # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly -spm-binary-cron: + spm-binary-cron: # Don't run on private repo. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' runs-on: macos-12 From f4bbc97a4b4b300dd1f03ccbc95d3c3f84ba2678 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:53:13 -0400 Subject: [PATCH 4/4] Unfreeze CI --- .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 01a57bcdde5..14ca76163ba 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -403,7 +403,7 @@ jobs: runs-on: ubuntu-latest if: always() name: Check all required Firestore tests results - needs: [cmake, cmake-prod-db, xcodebuild, spm] + 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'