Skip to content

Commit

Permalink
CI updates for visionOS and Xcode 16: part 2 (#13708)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 authored Sep 24, 2024
1 parent 3d61c54 commit 96ca3cd
Show file tree
Hide file tree
Showing 22 changed files with 642 additions and 362 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }}

spm-package-resolved:
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
runs-on: macos-14
outputs:
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/appdistribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
--platforms=${{ matrix.target }}
spm-package-resolved:
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
runs-on: macos-14
outputs:
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
Expand Down
85 changes: 44 additions & 41 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,50 +78,10 @@ jobs:
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'
strategy:
matrix:
scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests]

spm-package-resolved:
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
with:
cache_key: integration-tests${{ matrix.os }}
- name: Install Secrets
run: |
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \
FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret"
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
- uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
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:
Expand Down Expand Up @@ -169,6 +129,49 @@ jobs:
retry_wait_seconds: 120
command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }}

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'
needs: [spm-package-resolved]
strategy:
matrix:
scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests]
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Install Secrets
run: |
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \
FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret"
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret"
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
- uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }})

catalyst:
# 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
49 changes: 31 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,45 @@ 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:
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
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
48 changes: 32 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,45 @@ 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:
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
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
52 changes: 32 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,46 @@ jobs:
retry_wait_seconds: 120
command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} ${{ matrix.flags }}


spm-package-resolved:
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
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
Loading

0 comments on commit 96ca3cd

Please sign in to comment.