Skip to content

Commit 7351504

Browse files
authored
Run Messaging CI on Xcode 15 (#12028)
1 parent 88d1530 commit 7351504

File tree

3 files changed

+74
-74
lines changed

3 files changed

+74
-74
lines changed

.github/workflows/messaging.yml

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ concurrency:
2323

2424
jobs:
2525

26-
messaging:
26+
messaging-integration-tests:
2727
# Don't run on private repo unless it is a PR.
2828
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
2929
env:
3030
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
31+
# TODO: Investigate why PubSub integration tests fail with Xcode 15.0.1 on macos-13
32+
# runs-on: macos-13
3133
runs-on: macos-12
3234
steps:
3335
- uses: actions/checkout@v3
@@ -46,58 +48,60 @@ jobs:
4648
mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
4749
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
4850
FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
49-
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
51+
# - name: Xcode
52+
# run: sudo xcode-select -s /Applications/xcode_15.0.1.app/Contents/Developer
53+
- name: BuildAndTest
5054
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
5155

52-
5356
pod-lib-lint:
5457
# Don't run on private repo unless it is a PR.
5558
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
56-
runs-on: macos-12
57-
5859
strategy:
5960
matrix:
6061
podspec: [FirebaseMessagingInterop.podspec, FirebaseMessaging.podspec]
6162
target: [ios, tvos, macos --skip-tests, watchos --skip-tests] # skipping tests on mac because of keychain access
63+
os: [macos-12, macos-13]
64+
include:
65+
- os: macos-12
66+
xcode: Xcode_14.2
67+
- os: macos-13
68+
xcode: Xcode_15.0.1
69+
runs-on: ${{ matrix.os }}
6270
steps:
6371
- uses: actions/checkout@v3
6472
- uses: ruby/setup-ruby@v1
6573
- name: Setup Bundler
6674
run: scripts/setup_bundler.sh
75+
- name: Xcode
76+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
6777
- name: Build and test
68-
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
78+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}
6979

7080
spm:
7181
# Don't run on private repo unless it is a PR.
7282
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
73-
runs-on: macos-12
74-
strategy:
75-
matrix:
76-
target: [iOS, watchOS]
77-
steps:
78-
- uses: actions/checkout@v3
79-
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
80-
with:
81-
cache_key: ${{ matrix.os }}
82-
- name: Initialize xcodebuild
83-
run: scripts/setup_spm_tests.sh
84-
- name: Unit Tests
85-
run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
86-
87-
spm-cron:
88-
# Don't run on private repo.
89-
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
90-
runs-on: macos-12
9183
strategy:
9284
matrix:
93-
target: [tvOS, macOS, catalyst]
85+
target: [iOS, watchOS, tvOS, macOS, catalyst, visionOS]
86+
os: [macos-12, macos-13]
87+
include:
88+
- os: macos-12
89+
xcode: Xcode_14.2
90+
- os: macos-13
91+
xcode: Xcode_15.0.1
92+
exclude:
93+
- os: macos-12
94+
target: visionOS
95+
runs-on: ${{ matrix.os }}
9496
steps:
9597
- uses: actions/checkout@v3
9698
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
9799
with:
98100
cache_key: ${{ matrix.os }}
99101
- name: Initialize xcodebuild
100102
run: scripts/setup_spm_tests.sh
103+
- name: Xcode
104+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
101105
- name: Unit Tests
102106
run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
103107

@@ -122,7 +126,14 @@ jobs:
122126
env:
123127
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
124128
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
125-
runs-on: macos-12
129+
strategy:
130+
matrix:
131+
include:
132+
- os: macos-12
133+
xcode: Xcode_14.2
134+
- os: macos-13
135+
xcode: Xcode_15.0.1
136+
runs-on: ${{ matrix.os }}
126137
steps:
127138
- uses: actions/checkout@v3
128139
- uses: ruby/setup-ruby@v1
@@ -131,6 +142,8 @@ jobs:
131142
- name: Install Secret GoogleService-Info.plist
132143
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
133144
quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
145+
- name: Xcode
146+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
134147
- name: Test objc quickstart
135148
run: ([ -z $plist_secret ] ||
136149
scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
@@ -169,28 +182,32 @@ jobs:
169182
messaging-cron-only:
170183
# Don't run on private repo.
171184
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
172-
runs-on: macos-12
173185
strategy:
174186
matrix:
175187
target: [ios, tvos, macos --skip-tests, watchos --skip-tests]
176-
flags: [
177-
'--use-modular-headers'
178-
]
179-
needs: pod-lib-lint
188+
os: [macos-12, macos-13]
189+
include:
190+
- os: macos-12
191+
xcode: Xcode_14.2
192+
- os: macos-13
193+
xcode: Xcode_15.0.1
194+
runs-on: ${{ matrix.os }}
180195
steps:
181196
- uses: actions/checkout@v3
182197
- uses: ruby/setup-ruby@v1
183198
- name: Setup Bundler
184199
run: scripts/setup_bundler.sh
200+
- name: Xcode
201+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
185202
- name: PodLibLint Messaging Cron
186-
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
203+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --test-specs=unit --platforms=${{ matrix.target }} --use-static-frameworks
187204

188205
messaging-sample-build-test:
189206
# Don't run on private repo unless it is a PR.
190207
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
191208
env:
192209
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
193-
runs-on: macos-12
210+
runs-on: macos-13
194211
steps:
195212
- uses: actions/checkout@v3
196213
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
@@ -205,6 +222,8 @@ jobs:
205222
FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
206223
- name: Prereqs
207224
run: scripts/install_prereqs.sh MessagingSample iOS
225+
- name: Xcode
226+
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
208227
- name: Build
209228
run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
210229

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

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

.github/workflows/storage.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
jobs:
20-
storage:
20+
storage-integration-tests:
2121
# Don't run on private repo unless it is a PR.
2222
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
2323
strategy:
2424
matrix:
2525
include:
26-
# Only one os to avoid contention in the integration tests.
27-
# - os: macos-12
28-
# xcode: Xcode_14.2
29-
- os: macos-13
30-
xcode: xcode_15.0.1
26+
# TODO: investigate integration test extreme flakiness on Xcode 15
27+
- os: macos-12
28+
xcode: Xcode_14.2
29+
# - os: macos-13
30+
# xcode: Xcode_15.0.1
3131
env:
3232
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
3333
runs-on: ${{ matrix.os }}
@@ -65,7 +65,7 @@ jobs:
6565
- os: macos-12
6666
xcode: Xcode_14.2
6767
- os: macos-13
68-
xcode: xcode_15.0.1
68+
xcode: Xcode_15.0.1
6969
runs-on: ${{ matrix.os }}
7070
steps:
7171
- uses: actions/checkout@v3
@@ -81,7 +81,7 @@ jobs:
8181

8282
spm-cron:
8383
# Don't run on private repo.
84-
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
84+
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
8585
strategy:
8686
matrix:
8787
target: [tvOS, macOS, catalyst, watchOS]
@@ -90,7 +90,7 @@ jobs:
9090
- os: macos-12
9191
xcode: Xcode_14.2
9292
- os: macos-13
93-
xcode: xcode_15.0.1
93+
xcode: Xcode_15.0.1
9494
runs-on: ${{ matrix.os }}
9595
steps:
9696
- uses: actions/checkout@v3
@@ -115,7 +115,7 @@ jobs:
115115
- os: macos-12
116116
xcode: Xcode_14.2
117117
- os: macos-13
118-
xcode: xcode_15.0.1
118+
xcode: Xcode_15.0.1
119119
env:
120120
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
121121
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
@@ -174,7 +174,7 @@ jobs:
174174
- os: macos-12
175175
xcode: Xcode_14.2
176176
- os: macos-13
177-
xcode: xcode_15.0.1
177+
xcode: Xcode_15.0.1
178178
runs-on: ${{ matrix.os }}
179179
steps:
180180
- uses: actions/checkout@v3
@@ -191,16 +191,19 @@ jobs:
191191
192192
storage-cron-only:
193193
# Don't run on private repo.
194-
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
194+
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
195195
strategy:
196196
matrix:
197-
target: [ios, tvos, macos, watchos]
197+
target: [ios, tvos, macos, watchos, visionOS]
198198
os: [macos-12, macos-13]
199199
include:
200200
- os: macos-12
201201
xcode: Xcode_14.2
202202
- os: macos-13
203203
xcode: xcode_15.0.1
204+
exclude:
205+
- os: macos-12
206+
target: visionOS
204207
runs-on: ${{ matrix.os }}
205208
needs: pod-lib-lint
206209
steps:

scripts/build.sh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,6 @@ case "$product-$platform-$method" in
377377
AppHost-FirebaseMessaging-Unit-Tests \
378378
../../../FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist
379379

380-
RunXcodebuild \
381-
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
382-
-scheme "FirebaseMessaging-Unit-unit" \
383-
"${ios_flags[@]}" \
384-
"${xcb_flags[@]}" \
385-
build \
386-
test
387-
388380
if check_secrets; then
389381
# Integration tests are only run on iOS to minimize flake failures.
390382
RunXcodebuild \
@@ -394,24 +386,6 @@ case "$product-$platform-$method" in
394386
"${xcb_flags[@]}" \
395387
test
396388
fi
397-
398-
pod_gen FirebaseMessaging.podspec --platforms=macos --clean
399-
RunXcodebuild \
400-
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
401-
-scheme "FirebaseMessaging-Unit-unit" \
402-
"${macos_flags[@]}" \
403-
"${xcb_flags[@]}" \
404-
build \
405-
test
406-
407-
pod_gen FirebaseMessaging.podspec --platforms=tvos --clean
408-
RunXcodebuild \
409-
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
410-
-scheme "FirebaseMessaging-Unit-unit" \
411-
"${tvos_flags[@]}" \
412-
"${xcb_flags[@]}" \
413-
build \
414-
test
415389
;;
416390

417391
MessagingSample-*-*)

0 commit comments

Comments
 (0)