@@ -483,6 +483,37 @@ jobs:
483
483
- name : Swift Build
484
484
run : scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly
485
485
486
+ check-firestore-internal-public-headers :
487
+ # Either a scheduled run from public repo, or a pull request with firestore changes.
488
+ if : |
489
+ (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
490
+ (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
491
+ runs-on : macos-12
492
+ needs : check
493
+ steps :
494
+ - uses : actions/checkout@v4
495
+ - name : Assert that Firestore and FirestoreInternal have identically named headers.
496
+ run : |
497
+ fst_dir=Firestore/Source/Public/FirebaseFirestore/
498
+ fst_internal_dir=FirebaseFirestoreInternal/FirebaseFirestore/
499
+
500
+ comparison=$(comm -3 <(ls $fst_dir | sort) <(ls $fst_internal_dir | sort))
501
+
502
+ if [[ -z "$comparison" ]]; then
503
+ echo "Success: Directories '$fst_dir' and '$fst_internal_dir' match."
504
+ else
505
+ echo "Error: Directories '$fst_dir' and '$fst_internal_dir' differ:"
506
+ echo "Files only in '$fst_dir':"
507
+ # Files in this set do not start with whitespace. Grep for them and a
508
+ # dashed prefix for nicer formatting.
509
+ echo "$comparison" | grep -v '^\s' | sed 's/^/- /'
510
+ echo "Files only in '$fst_internal_dir':"
511
+ # Files in this set start with whitespace. Grep for them and a dashed
512
+ # prefix for nicer formatting.
513
+ echo "$comparison" | grep '^\s' | sed 's/^ /- /'
514
+ exit 1
515
+ fi
516
+
486
517
# TODO: Re-enable either in or after #11706.
487
518
# spm-source-cron:
488
519
# # Don't run on private repo.
0 commit comments