google / GoogleSignIn-iOS

Enables iOS and macOS apps to sign in with Google.
https://developers.google.com/identity/sign-in/ios
Apache License 2.0
472 stars 189 forks source link

Uncomment and reenable using local GoogleSignIn.podspec in unit_tests.yml #400

Closed mdmathias closed 2 months ago

mdmathias commented 4 months ago

Context

399 reverted GoogleSignInSwiftSupport.podspec's dependency on the GoogleSignIn pod to be 7.1+. This meant that the dependency for GSI in GoogleSignInSwiftSupport in the fac-eap branch did not match the version listed in GoogleSignIn.podspec, which was "7.1.0-fac-beta-1.1.0".

Problem

This mismatch, seemingly innocuous, led to pod lib lint failures (locally and PR runs) due to a version mismatch. Ultimately, the issue is that the pod lib lint command passed in the local GoogleSignIn.podspec, but linting GoogleSignInSwiftSupport.podspec would fail since the latter was looking for version 7.1+, and GoogleSignIn.podspec listed version "7.1.0-fac-beta-1.1.0".

To Do

399 resolved the issue by updating unit_tests.yml to not use the local GoogleSignIn.podspec. This transformed the failing command:

pod lib lint GoogleSignInSwiftSupport.podspec --verbose \
  --sources=https://cdn.cocoapods.org/ \
  --include-podspecs='GoogleSignIn.podspec'

to this passing version:

pod lib lint GoogleSignInSwiftSupport.podspec --verbose \
  --sources=https://cdn.cocoapods.org/ \

When we merge fac-eap to the main branch, we should reenable using the local podspec. We should also make sure that the version of GSI listed in GoogleSignInSwiftSupport.podspec matches the version in GoogleSignIn.podspec.

mdmathias commented 4 months ago

In particular, the pod-lib-lint job needs to look like this again:

  pod-lib-lint:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macos-12]
        podspec: [GoogleSignIn.podspec, GoogleSignInSwiftSupport.podspec]
        flag: [
          "",
          "--use-static-frameworks"
        ]
        include:
          - podspec: GoogleSignInSwiftSupport.podspec
            includePodspecFlag: "--include-podspecs='GoogleSignIn.podspec'"
    steps:
    - uses: actions/checkout@v3
    - name: Update Bundler
      run: bundle update --bundler
    - name: Install Ruby gems with Bundler
      run: bundle install
    - name: Lint podspec using local source
      run: |
        pod lib lint ${{ matrix.podspec }} --verbose \
           ${{ matrix.includePodspecFlag }} ${{ matrix.flag }}