From 6d7acc667125743ce70c0ca46142faa6a5c35f72 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Sep 2024 15:39:02 -0700 Subject: [PATCH] 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