Skip to content

Commit a2fbd12

Browse files
authored
Build GDTCCT watchOS test apps in GHA (#5495)
1 parent 06ac0d6 commit a2fbd12

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.github/workflows/datatransport.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ jobs:
3737
- name: Setup project and Test Catalyst
3838
run: scripts/third_party/travis/retry.sh scripts/test_catalyst.sh ${{ matrix.pod }} test
3939

40+
watchos-testapp:
41+
runs-on: macOS-latest
42+
strategy:
43+
matrix:
44+
pod: [GoogleDataTransport, GoogleDataTransportCCTSupport]
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Setup Bundler
48+
run: scripts/setup_bundler.sh
49+
- name: Prereqs
50+
run: scripts/install_prereqs.sh ${{ matrix.pod }} watchOS xcodebuild
51+
- name: Setup project and build watchOS test app
52+
run: scripts/third_party/travis/retry.sh scripts/build.sh ${{ matrix.pod }} watchOS xcodebuild
53+
4054
# Scheduled jobs
4155

4256
datatransport-cron-only:

scripts/build.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ product can be one of:
3838
Storage
3939
StorageSwift
4040
SymbolCollision
41+
GoogleDataTransport
42+
GoogleDataTransportCCTSupport
4143
4244
platform can be one of:
4345
iOS (default)
4446
macOS
4547
tvOS
48+
watchOS
4649
4750
method can be one of:
4851
xcodebuild (default)
@@ -201,6 +204,9 @@ tvos_flags=(
201204
-sdk "appletvsimulator"
202205
-destination 'platform=tvOS Simulator,name=Apple TV'
203206
)
207+
watchos_flags=(
208+
-destination 'platform=iOS Simulator,name=iPhone 11 Pro'
209+
)
204210

205211
# Compute standard flags for all platforms
206212
case "$platform" in
@@ -220,6 +226,10 @@ case "$platform" in
220226
xcb_flags=("${tvos_flags[@]}")
221227
;;
222228

229+
watchOS)
230+
xcb_flags=("${watchos_flags[@]}")
231+
;;
232+
223233
all)
224234
xcb_flags=()
225235
;;
@@ -505,6 +515,28 @@ case "$product-$platform-$method" in
505515
test
506516
fi
507517
;;
518+
519+
GoogleDataTransport-watchOS-xcodebuild)
520+
RunXcodebuild \
521+
-workspace 'GoogleDataTransport/GDTWatchOSTestApp/GDTWatchOSTestApp.xcworkspace' \
522+
-scheme "GDTWatchOSTestAppWatchKitApp" \
523+
"${xcb_flags[@]}" \
524+
build
525+
;;
526+
527+
GoogleDataTransportCCTSupport-watchOS-xcodebuild)
528+
RunXcodebuild \
529+
-workspace 'GoogleDataTransportCCTSupport/GDTCCTWatchOSTestApp/GDTCCTWatchOSTestApp.xcworkspace' \
530+
-scheme "GDTCCTWatchOSIndependentTestAppWatchKitApp" \
531+
"${xcb_flags[@]}" \
532+
build
533+
534+
RunXcodebuild \
535+
-workspace 'GoogleDataTransportCCTSupport/GDTCCTWatchOSTestApp/GDTCCTWatchOSTestApp.xcworkspace' \
536+
-scheme "GDTCCTWatchOSCompanionTestApp" \
537+
"${xcb_flags[@]}" \
538+
build
539+
;;
508540
*)
509541
echo "Don't know how to build this product-platform-method combination" 1>&2
510542
echo " product=$product" 1>&2

scripts/install_prereqs.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ case "$project-$platform-$method" in
184184
bundle exec pod install --project-directory=FirebaseMessaging/Apps/Sample --repo-update
185185
;;
186186

187+
GoogleDataTransport-watchOS-xcodebuild)
188+
install_xcpretty
189+
bundle exec pod install --project-directory=GoogleDataTransport/GDTWatchOSTestApp/ --repo-update
190+
;;
191+
192+
GoogleDataTransportCCTSupport-watchOS-xcodebuild)
193+
install_xcpretty
194+
bundle exec pod install --project-directory=GoogleDataTransportCCTSupport/GDTCCTWatchOSTestApp/ --repo-update
195+
;;
196+
187197
*-pod-lib-lint)
188198
;;
189199

0 commit comments

Comments
 (0)