Skip to content

Commit

Permalink
CI updates for visionOS and Xcode 16: part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Sep 24, 2024
1 parent c07397c commit e97db60
Show file tree
Hide file tree
Showing 19 changed files with 556 additions and 318 deletions.
47 changes: 29 additions & 18 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ jobs:
matrix:
# TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
target: [ios, tvos, macos --skip-tests, watchos]
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -39,28 +35,43 @@ jobs:
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }}

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:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
include:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.3
- os: macos-14
xcode: Xcode_15.3
target: visionOS
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 }}-${{ matrix.target }}
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/core_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ jobs:
strategy:
matrix:
target: [ios, tvos, macos, watchos]
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
46 changes: 30 additions & 16 deletions .github/workflows/core_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ jobs:
strategy:
matrix:
target: [ios, tvos, macos, watchos]
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -35,25 +31,43 @@ jobs:
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }}

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:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
include:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.3
- os: macos-14
xcode: Xcode_15.3
target: visionOS
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: Xcode
Expand Down
50 changes: 30 additions & 20 deletions .github/workflows/crashlytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,12 @@ jobs:
strategy:
matrix:
target: [ios, tvos, macos, watchos --skip-tests]
os: [macos-14, macos-13]
os: [macos-14]
flags: [
'--use-modular-headers',
''
]
include:
- os: macos-14
xcode: Xcode_15.3
tests: --skip-tests
- os: macos-13
xcode: Xcode_15.2
tests:
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -53,28 +47,44 @@ jobs:
retry_wait_seconds: 120
command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} ${{ matrix.flags }}


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:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
include:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.3
- os: macos-14
xcode: Xcode_15.3
target: visionOS
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 }}-${{ matrix.target }}
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
Expand Down
50 changes: 29 additions & 21 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,9 @@ jobs:
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
strategy:
matrix:
# TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
target: [ios, tvos, macos --skip-tests, watchos]
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
tests: --skip-tests
- os: macos-13
xcode: Xcode_15.2
tests: --test-specs=unit
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -64,28 +57,43 @@ jobs:
# Only iOS to mitigate flakes.
run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration

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:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
include:
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.3
- os: macos-14
xcode: Xcode_15.3
target: visionOS
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 }}-${{ matrix.target }}
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/dynamiclinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ jobs:

strategy:
matrix:
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -39,24 +35,42 @@ jobs:
- name: FirebaseDynamicLinks
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --allow-warnings

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:
max-parallel: 1
matrix:
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
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: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
Expand Down
Loading

0 comments on commit e97db60

Please sign in to comment.