Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Messaging CI on Xcode 15 #12028

Merged
merged 8 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 58 additions & 35 deletions .github/workflows/messaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ concurrency:

jobs:

messaging:
messaging-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'
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# TODO: Investigate why PubSub integration tests fail with Xcode 15.0.1 on macos-13
# runs-on: macos-13
runs-on: macos-12
steps:
- uses: actions/checkout@v3
Expand All @@ -46,58 +48,60 @@ jobs:
mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
# - name: Xcode
# run: sudo xcode-select -s /Applications/xcode_15.0.1.app/Contents/Developer
- name: BuildAndTest
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)


pod-lib-lint:
# 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'
runs-on: macos-12

strategy:
matrix:
podspec: [FirebaseMessagingInterop.podspec, FirebaseMessaging.podspec]
target: [ios, tvos, macos --skip-tests, watchos --skip-tests] # skipping tests on mac because of keychain access
os: [macos-12, macos-13]
include:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}

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'
runs-on: macos-12
strategy:
matrix:
target: [iOS, watchOS]
steps:
- uses: actions/checkout@v3
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
with:
cache_key: ${{ matrix.os }}
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm

spm-cron:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
runs-on: macos-12
strategy:
matrix:
target: [tvOS, macOS, catalyst]
target: [iOS, watchOS, tvOS, macOS, catalyst, visionOS]
os: [macos-12, macos-13]
include:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: Xcode_15.0.1
exclude:
- os: macos-12
target: visionOS
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
with:
cache_key: ${{ matrix.os }}
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm

Expand All @@ -122,7 +126,14 @@ jobs:
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-12
strategy:
matrix:
include:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
Expand All @@ -131,6 +142,8 @@ jobs:
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Test objc quickstart
run: ([ -z $plist_secret ] ||
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
Expand Down Expand Up @@ -169,28 +182,32 @@ jobs:
messaging-cron-only:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
runs-on: macos-12
strategy:
matrix:
target: [ios, tvos, macos --skip-tests, watchos --skip-tests]
flags: [
'--use-modular-headers'
]
needs: pod-lib-lint
os: [macos-12, macos-13]
include:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: PodLibLint Messaging Cron
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --test-specs=unit --platforms=${{ matrix.target }} --use-static-frameworks

messaging-sample-build-test:
# 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'
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
Expand All @@ -205,6 +222,8 @@ jobs:
FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
- name: Prereqs
run: scripts/install_prereqs.sh MessagingSample iOS
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build
run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)

Expand All @@ -213,7 +232,7 @@ jobs:
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
Expand All @@ -228,6 +247,8 @@ jobs:
FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
- name: Prereqs
run: scripts/install_prereqs.sh SwiftUISample iOS
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build
run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS)

Expand All @@ -236,7 +257,7 @@ jobs:
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
Expand All @@ -251,6 +272,8 @@ jobs:
FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
- name: Prereqs
run: scripts/install_prereqs.sh MessagingSampleStandaloneWatchApp watchOS
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build
run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS)

29 changes: 16 additions & 13 deletions .github/workflows/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ concurrency:
cancel-in-progress: true

jobs:
storage:
storage-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:
include:
# Only one os to avoid contention in the integration tests.
# - os: macos-12
# xcode: Xcode_14.2
- os: macos-13
xcode: xcode_15.0.1
# TODO: investigate integration test extreme flakiness on Xcode 15
- os: macos-12
xcode: Xcode_14.2
# - os: macos-13
# xcode: Xcode_15.0.1
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: xcode_15.0.1
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -81,7 +81,7 @@ jobs:

spm-cron:
# Don't run on private repo.
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
strategy:
matrix:
target: [tvOS, macOS, catalyst, watchOS]
Expand All @@ -90,7 +90,7 @@ jobs:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: xcode_15.0.1
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -115,7 +115,7 @@ jobs:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: xcode_15.0.1
xcode: Xcode_15.0.1
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: xcode_15.0.1
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -191,16 +191,19 @@ jobs:

storage-cron-only:
# Don't run on private repo.
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
strategy:
matrix:
target: [ios, tvos, macos, watchos]
target: [ios, tvos, macos, watchos, visionOS]
os: [macos-12, macos-13]
include:
- os: macos-12
xcode: Xcode_14.2
- os: macos-13
xcode: xcode_15.0.1
exclude:
- os: macos-12
target: visionOS
runs-on: ${{ matrix.os }}
needs: pod-lib-lint
steps:
Expand Down
26 changes: 0 additions & 26 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,6 @@ case "$product-$platform-$method" in
AppHost-FirebaseMessaging-Unit-Tests \
../../../FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist

RunXcodebuild \
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
-scheme "FirebaseMessaging-Unit-unit" \
"${ios_flags[@]}" \
"${xcb_flags[@]}" \
build \
test

if check_secrets; then
# Integration tests are only run on iOS to minimize flake failures.
RunXcodebuild \
Expand All @@ -394,24 +386,6 @@ case "$product-$platform-$method" in
"${xcb_flags[@]}" \
test
fi

pod_gen FirebaseMessaging.podspec --platforms=macos --clean
RunXcodebuild \
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
-scheme "FirebaseMessaging-Unit-unit" \
"${macos_flags[@]}" \
"${xcb_flags[@]}" \
build \
test

pod_gen FirebaseMessaging.podspec --platforms=tvos --clean
RunXcodebuild \
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
-scheme "FirebaseMessaging-Unit-unit" \
"${tvos_flags[@]}" \
"${xcb_flags[@]}" \
build \
test
;;

MessagingSample-*-*)
Expand Down
Loading