diff --git a/.github/workflows/common_cocoapods.yml b/.github/workflows/common_cocoapods.yml index 50834b04431..6536c5a3f47 100644 --- a/.github/workflows/common_cocoapods.yml +++ b/.github/workflows/common_cocoapods.yml @@ -69,6 +69,12 @@ on: required: false default: false + # Whether to lint with `--analyze`. Defaults to true. + analyze: + type: boolean + required: false + default: true + # Whether to additionally build with Swift 6. Defaults to false. supports_swift6: type: boolean @@ -140,5 +146,6 @@ jobs: command: | scripts/pod_lib_lint.rb ${{ inputs.product }}.podspec --platforms=${{ matrix.platform }} \ ${{ inputs.allow_warnings == true && '--allow-warnings' || '' }} \ + ${{ inputs.analyze == false && '--no-analyze' || '' }} \ ${{ inputs.test_specs != '' && format('--test-specs={0}', inputs.test_specs) || '' }} \ ${{ (contains(inputs.buildonly_platforms, matrix.platform) || contains(inputs.buildonly_platforms, 'all')) && '--skip-tests' || '' }} diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 6282b0511d5..8f4ac2b1264 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -83,6 +83,10 @@ jobs: # This workflow - '.github/workflows/firestore.yml' + # Workflows this one depends on. + - '.github/workflows/common.yml' + - '.github/workflows/common_cocoapods.yml' + # Rebuild on Ruby infrastructure changes. - 'Gemfile*' @@ -379,37 +383,17 @@ jobs: export EXPERIMENTAL_MODE=true scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild - - pod-lib-lint: + 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') - runs-on: macos-15 strategy: matrix: - podspec: [ - 'FirebaseFirestoreInternal.podspec', - 'FirebaseFirestore.podspec', - ] - - steps: - - uses: actions/checkout@v4 - - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer - - - name: Pod lib lint - # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \ - --platforms=ios \ - --allow-warnings \ - --no-analyze + product: ['FirebaseFirestoreInternal', 'FirebaseFirestore'] + uses: ./.github/workflows/common_cocoapods.yml + with: + product: ${{ matrix.product }} + platforms: iOS + allow_warnings: true + analyze: false # TODO(#9565, b/227461966): Remove when absl is fixed. # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. pod-lib-lint-cron: @@ -524,23 +508,11 @@ 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-15 - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: spm-binary - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - 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 + uses: ./.github/workflows/common.yml + with: + target: FirebaseFirestore + platforms: iOS + buildonly_platforms: iOS check-firestore-internal-public-headers: needs: check