Skip to content

Commit

Permalink
review and fixes for first three
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Sep 23, 2024
1 parent c89780c commit 6d7acc6
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/appdistribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ 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]
xcode: [Xcode_15.2, Xcode_16]
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
Expand Down
58 changes: 55 additions & 3 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down

0 comments on commit 6d7acc6

Please sign in to comment.