firestore.yml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. # Copyright 2020 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: firestore
  15. on:
  16. workflow_dispatch:
  17. pull_request:
  18. schedule:
  19. # Run every day at 12am (PST) - cron uses UTC times
  20. - cron: '0 8 * * *'
  21. concurrency:
  22. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  23. cancel-in-progress: true
  24. jobs:
  25. changes:
  26. runs-on: macos-14
  27. # Only when this is not a scheduled run
  28. if: github.event_name != 'schedule'
  29. outputs:
  30. changed: ${{ steps.firestore_src_changes.outputs.sources == 'true' || steps.related_changes.outputs.other_changes == 'true' }}
  31. steps:
  32. - uses: dorny/paths-filter@v3.0.2
  33. id: firestore_src_changes
  34. with:
  35. predicate-quantifier: 'every'
  36. filters: |
  37. sources:
  38. # Firestore sources
  39. - 'Firestore/**'
  40. - '!Firestore/**/*.md'
  41. - uses: dorny/paths-filter@v3.0.2
  42. id: related_changes
  43. with:
  44. filters: |
  45. other_changes:
  46. # Interop headers
  47. - 'FirebaseAuth/Interop/*.h'
  48. # FirebaseCore header change
  49. - 'FirebaseCore/Internal'
  50. - 'FirebaseCore/Sources/Public'
  51. # Podspec
  52. - 'FirebaseFirestoreInternal.podspec'
  53. - 'FirebaseFirestore.podspec'
  54. # Package.swift
  55. - 'Package.swift'
  56. # CMake
  57. - '**CMakeLists.txt'
  58. - 'cmake/**'
  59. # Build scripts to which Firestore is sensitive
  60. #
  61. # Note that this doesn't include check scripts because changing those will
  62. # already trigger the check workflow.
  63. - 'scripts/binary_to_array.py'
  64. - 'scripts/build.sh'
  65. - 'scripts/install_prereqs.sh'
  66. - 'scripts/localize_podfile.swift'
  67. - 'scripts/pod_lib_lint.rb'
  68. - 'scripts/run_firestore_emulator.sh'
  69. - 'scripts/setup_*'
  70. - 'scripts/sync_project.rb'
  71. - 'scripts/test_quickstart.sh'
  72. - 'scripts/xcresult_logs.py'
  73. # This workflow
  74. - '.github/workflows/firestore.yml'
  75. # Rebuild on Ruby infrastructure changes.
  76. - 'Gemfile*'
  77. check:
  78. needs: changes
  79. # Either a scheduled run from public repo, or a pull request with firestore changes.
  80. if: |
  81. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  82. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  83. runs-on: macos-14
  84. steps:
  85. - uses: actions/checkout@v4
  86. - uses: actions/setup-python@v5
  87. with:
  88. python-version: 3.11
  89. - name: Setup check
  90. run: scripts/setup_check.sh
  91. - name: Run check
  92. run: scripts/check.sh --test-only
  93. cmake:
  94. needs: check
  95. # Either a scheduled run from public repo, or a pull request with firestore changes.
  96. if: |
  97. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  98. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  99. strategy:
  100. matrix:
  101. os: [ubuntu-latest]
  102. cpp_version: [default, 17, 20]
  103. compiler: [gcc, clang]
  104. include:
  105. - os: macos-14
  106. cpp_version: default
  107. env:
  108. MINT_PATH: ${{ github.workspace }}/mint
  109. runs-on: ${{ matrix.os }}
  110. steps:
  111. - uses: actions/checkout@v4
  112. - name: Prepare ccache
  113. uses: actions/cache@v4
  114. with:
  115. path: ${{ runner.temp }}/ccache
  116. key: firestore-ccache-${{ runner.os }}-cpp=${{ matrix.cpp_version }}-compiler=${{ matrix.compiler }}-${{ github.sha }}
  117. restore-keys: |
  118. firestore-ccache-${{ runner.os }}-cpp=${{ matrix.cpp_version }}-compiler=${{ matrix.compiler }}-
  119. - name: Cache Mint packages
  120. uses: actions/cache@v4
  121. with:
  122. path: ${{ env.MINT_PATH }}
  123. key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
  124. restore-keys: ${{ runner.os }}-mint-
  125. - uses: actions/setup-python@v5
  126. with:
  127. python-version: '3.11'
  128. - name: Setup build
  129. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  130. - name: Patch CMake files to use the custom C++ version
  131. if: ${{ matrix.cpp_version != 'default' }}
  132. run: |
  133. readonly BEFORE=$(grep 'CMAKE_CXX_STANDARD\s\+[0-9]' cmake/compiler_setup.cmake)
  134. echo "BEFORE=$BEFORE"
  135. sed -i -e 's/CMAKE_CXX_STANDARD\s\+[0-9]\+/CMAKE_CXX_STANDARD ${{ matrix.cpp_version }}/' cmake/compiler_setup.cmake
  136. readonly AFTER=$(grep 'CMAKE_CXX_STANDARD\s\+[0-9]' cmake/compiler_setup.cmake)
  137. echo "AFTER=$AFTER"
  138. if [[ $BEFORE == $AFTER ]] ; then
  139. echo "ERROR: sed command did not actually change anything." >&2
  140. echo "Namely, the following line should have changed, but did not: $BEFORE" >&2
  141. echo "Make sure that the sed command is correct as it _should_ change the C++ version." >&2
  142. exit 1
  143. elif [[ $AFTER != *'${{ matrix.cpp_version }}'* ]] ; then
  144. echo "ERROR: sed command did not set the correct C++ version." >&2
  145. echo "Namely, the following line should have contained ${{ matrix.cpp_version }} but it did not: $AFTER" >&2
  146. echo "Make sure that the sed command is correct as it _should_ result in the c++ version being incorporated." >&2
  147. exit 1
  148. else:
  149. echo "C++ version changed successfully."
  150. fi
  151. - name: Set CC and CXX environment variables
  152. run: |
  153. echo 'matrix.compiler=${{ matrix.compiler }}'
  154. if [[ '${{ matrix.compiler }}' == 'gcc' ]] ; then
  155. echo 'Setting CC and CXX for gcc'
  156. echo "CC=gcc" >> $GITHUB_ENV
  157. echo "CXX=g++" >> $GITHUB_ENV
  158. gcc --version
  159. g++ --version
  160. elif [[ '${{ matrix.compiler }}' == 'clang' ]] ; then
  161. echo 'Setting CC and CXX for clang'
  162. echo "CC=clang" >> $GITHUB_ENV
  163. echo "CXX=clang++" >> $GITHUB_ENV
  164. clang --version
  165. clang++ --version
  166. else
  167. echo 'Setting neither CC nor CXX'
  168. cc --version
  169. c++ --version
  170. fi
  171. - name: Build and test
  172. run: |
  173. export EXPERIMENTAL_MODE=true
  174. export CCACHE_DIR=${{ runner.temp }}/ccache
  175. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  176. cmake-prod-db:
  177. needs: check
  178. # Either a scheduled run from public repo, or a pull request with firestore changes.
  179. if: |
  180. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  181. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  182. strategy:
  183. matrix:
  184. os: [macos-14]
  185. databaseId: [(default), test-db]
  186. env:
  187. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  188. MINT_PATH: ${{ github.workspace }}/mint
  189. TARGET_DATABASE_ID: ${{ matrix.databaseId }}
  190. runs-on: ${{ matrix.os }}
  191. steps:
  192. - uses: actions/checkout@v4
  193. - name: Prepare ccache
  194. uses: actions/cache@v4
  195. with:
  196. path: ${{ runner.temp }}/ccache
  197. key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }}
  198. restore-keys: |
  199. firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-
  200. - name: Cache Mint packages
  201. uses: actions/cache@v4
  202. with:
  203. path: ${{ env.MINT_PATH }}
  204. key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
  205. restore-keys: ${{ runner.os }}-mint-
  206. - uses: actions/setup-python@v5
  207. with:
  208. python-version: '3.11'
  209. - name: Install Secret GoogleService-Info.plist
  210. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore.plist.gpg \
  211. Firestore/Example/App/GoogleService-Info.plist "$plist_secret"
  212. - name: Install Google Service Account key
  213. run: |
  214. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore-integration.json.gpg \
  215. google-service-account.json "$plist_secret"
  216. # create composite indexes with Terraform
  217. - name: Set up Google Cloud SDK
  218. uses: google-github-actions/setup-gcloud@v1
  219. - name: Setup Terraform
  220. uses: hashicorp/setup-terraform@v2
  221. - name: Terraform Init
  222. run: |
  223. cd Firestore
  224. terraform init
  225. - name: Terraform Apply
  226. run: |
  227. cd Firestore
  228. # Define a temporary file, redirect both stdout and stderr to it
  229. output_file=$(mktemp)
  230. if ! terraform apply -var-file=../google-service-account.json -auto-approve > "$output_file" 2>&1 ; then
  231. cat "$output_file"
  232. if cat "$output_file" | grep -q "index already exists"; then
  233. echo "==================================================================================="
  234. echo "Terraform apply failed due to index already exists; We can safely ignore this error."
  235. echo "==================================================================================="
  236. fi
  237. exit 1
  238. fi
  239. rm -f "$output_file"
  240. env:
  241. GOOGLE_APPLICATION_CREDENTIALS: ../google-service-account.json
  242. continue-on-error: true
  243. - name: Setup build
  244. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  245. - name: Build and test
  246. run: |
  247. export CCACHE_DIR=${{ runner.temp }}/ccache
  248. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  249. sanitizers-mac:
  250. needs: check
  251. # Either a scheduled run from public repo, or a pull request with firestore changes.
  252. if: |
  253. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  254. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  255. strategy:
  256. matrix:
  257. os: [macos-14]
  258. sanitizer: [asan, tsan]
  259. runs-on: ${{ matrix.os }}
  260. env:
  261. SANITIZERS: ${{ matrix.sanitizer }}
  262. steps:
  263. - uses: actions/checkout@v4
  264. - name: Prepare ccache
  265. uses: actions/cache@v4
  266. with:
  267. path: ${{ runner.temp }}/ccache
  268. key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }}
  269. restore-keys: |
  270. ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-
  271. - uses: actions/setup-python@v5
  272. with:
  273. python-version: '3.11'
  274. - name: Setup build
  275. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  276. - name: Build and test
  277. run: |
  278. export EXPERIMENTAL_MODE=true
  279. export CCACHE_DIR=${{ runner.temp }}/ccache
  280. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  281. sanitizers-ubuntu:
  282. needs: check
  283. # Either a scheduled run from public repo, or a pull request with firestore changes.
  284. if: |
  285. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  286. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  287. strategy:
  288. matrix:
  289. os: [ubuntu-latest]
  290. # Excluding TSAN on ubuntu because of the warnings it generates around schedule.cc.
  291. # This could be due to Apple Clang provide additional support for synchronization
  292. # on Apple platforms, which is what we primarily care about.
  293. sanitizer: [asan]
  294. runs-on: ${{ matrix.os }}
  295. env:
  296. SANITIZERS: ${{ matrix.sanitizer }}
  297. ASAN_OPTIONS: detect_leaks=0
  298. steps:
  299. - uses: actions/checkout@v3
  300. - name: Prepare ccache
  301. uses: actions/cache@v4
  302. with:
  303. path: ${{ runner.temp }}/ccache
  304. key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }}
  305. restore-keys: |
  306. ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-
  307. - uses: actions/setup-python@v5
  308. with:
  309. python-version: '3.11'
  310. - name: Setup build
  311. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  312. - name: Build and test
  313. run: |
  314. export EXPERIMENTAL_MODE=true
  315. export CCACHE_DIR=${{ runner.temp }}/ccache
  316. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  317. xcodebuild:
  318. needs: check
  319. # Either a scheduled run from public repo, or a pull request with firestore changes.
  320. if: |
  321. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  322. (github.event_name == 'pull_request')
  323. runs-on: macos-14
  324. strategy:
  325. matrix:
  326. target: [iOS, macOS, tvOS]
  327. steps:
  328. - uses: actions/checkout@v4
  329. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  330. with:
  331. cache_key: ${{ matrix.target }}
  332. - uses: ruby/setup-ruby@v1
  333. - name: Setup build
  334. run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild
  335. - name: Build and test
  336. run: |
  337. export EXPERIMENTAL_MODE=true
  338. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild
  339. pod-lib-lint:
  340. needs: check
  341. # Either a scheduled run from public repo, or a pull request with firestore changes.
  342. if: |
  343. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  344. (github.event_name == 'pull_request')
  345. runs-on: macos-14
  346. strategy:
  347. matrix:
  348. podspec: [
  349. 'FirebaseFirestoreInternal.podspec',
  350. 'FirebaseFirestore.podspec',
  351. ]
  352. steps:
  353. - uses: actions/checkout@v4
  354. - uses: ruby/setup-ruby@v1
  355. - name: Setup Bundler
  356. run: ./scripts/setup_bundler.sh
  357. - name: Xcode
  358. run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
  359. - name: Pod lib lint
  360. # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
  361. run: |
  362. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \
  363. --platforms=ios \
  364. --allow-warnings \
  365. --no-analyze
  366. # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron.
  367. pod-lib-lint-cron:
  368. needs: check
  369. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  370. strategy:
  371. matrix:
  372. podspec: [
  373. 'FirebaseFirestoreInternal.podspec',
  374. 'FirebaseFirestore.podspec',
  375. ]
  376. platforms: [
  377. 'macos',
  378. 'tvos',
  379. 'ios',
  380. ]
  381. flags: [
  382. '--use-static-frameworks',
  383. '',
  384. ]
  385. os: [macos-14, macos-13]
  386. # TODO: grpc and its dependencies don't build on Xcode 15 for macos because their minimum macos is lower than 10.11.
  387. exclude:
  388. - os: macos-13
  389. platforms: 'macos'
  390. # Skip matrix cells covered by pod-lib-lint job.
  391. - os: macos-13
  392. platforms: 'ios'
  393. include:
  394. - os: macos-15
  395. xcode: Xcode_16
  396. - os: macos-13
  397. xcode: Xcode_15.2
  398. runs-on: ${{ matrix.os }}
  399. steps:
  400. - uses: actions/checkout@v4
  401. - uses: ruby/setup-ruby@v1
  402. - name: Setup Bundler
  403. run: ./scripts/setup_bundler.sh
  404. - name: Xcode
  405. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  406. - name: Pod lib lint
  407. # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
  408. run: |
  409. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\
  410. ${{ matrix.flags }} \
  411. --platforms=${{ matrix.platforms }} \
  412. --allow-warnings \
  413. --no-analyze
  414. spm-package-resolved:
  415. runs-on: macos-14
  416. env:
  417. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  418. FIREBASE_SOURCE_FIRESTORE: 1
  419. outputs:
  420. cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  421. steps:
  422. - uses: actions/checkout@v4
  423. - name: Generate Swift Package.resolved
  424. id: swift_package_resolve
  425. run: |
  426. swift package resolve
  427. - name: Generate cache key
  428. id: generate_cache_key
  429. run: |
  430. cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  431. echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  432. - uses: actions/cache/save@v4
  433. id: cache
  434. with:
  435. path: .build
  436. key: ${{ steps.generate_cache_key.outputs.cache_key }}
  437. spm-source:
  438. needs: [check, spm-package-resolved]
  439. # Either a scheduled run from public repo, or a pull request with firestore changes.
  440. if: |
  441. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  442. (github.event_name == 'pull_request')
  443. strategy:
  444. matrix:
  445. include:
  446. - os: macos-13
  447. xcode: Xcode_15.2
  448. target: iOS
  449. - os: macos-14
  450. xcode: Xcode_15.4
  451. target: iOS
  452. - os: macos-15
  453. xcode: Xcode_16
  454. target: iOS
  455. - os: macos-15
  456. xcode: Xcode_16
  457. target: tvOS
  458. - os: macos-15
  459. xcode: Xcode_16
  460. target: macOS
  461. - os: macos-15
  462. xcode: Xcode_16
  463. target: catalyst
  464. - os: macos-15
  465. xcode: Xcode_16
  466. target: visionOS
  467. runs-on: ${{ matrix.os }}
  468. env:
  469. FIREBASE_SOURCE_FIRESTORE: 1
  470. steps:
  471. - uses: actions/checkout@v4
  472. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  473. with:
  474. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  475. - name: Xcode
  476. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  477. - name: Initialize xcodebuild
  478. run: scripts/setup_spm_tests.sh
  479. - name: iOS Build Test
  480. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
  481. spm-binary:
  482. needs: check
  483. # Either a scheduled run from public repo, or a pull request with firestore changes.
  484. if: |
  485. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  486. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  487. runs-on: macos-14
  488. steps:
  489. - uses: actions/checkout@v4
  490. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  491. with:
  492. cache_key: spm-binary
  493. - name: Initialize xcodebuild
  494. run: scripts/setup_spm_tests.sh
  495. - name: iOS Build Test
  496. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly
  497. check-firestore-internal-public-headers:
  498. needs: check
  499. # Either a scheduled run from public repo, or a pull request with firestore changes.
  500. if: |
  501. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  502. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  503. runs-on: macos-14
  504. steps:
  505. - uses: actions/checkout@v4
  506. - name: Assert that Firestore and FirestoreInternal have identically named headers.
  507. run: |
  508. fst_dir=Firestore/Source/Public/FirebaseFirestore/
  509. fst_internal_dir=FirebaseFirestoreInternal/FirebaseFirestore/
  510. comparison=$(comm -3 <(ls $fst_dir | sort) <(ls $fst_internal_dir | sort))
  511. if [[ -z "$comparison" ]]; then
  512. echo "Success: Directories '$fst_dir' and '$fst_internal_dir' match."
  513. else
  514. echo "Error: Directories '$fst_dir' and '$fst_internal_dir' differ:"
  515. echo "Files only in '$fst_dir':"
  516. # Files in this set do not start with whitespace. Grep for them and a
  517. # dashed prefix for nicer formatting.
  518. echo "$comparison" | grep -v '^\s' | sed 's/^/- /'
  519. echo "Files only in '$fst_internal_dir':"
  520. # Files in this set start with whitespace. Grep for them and a dashed
  521. # prefix for nicer formatting.
  522. echo "$comparison" | grep '^\s' | sed 's/^ /- /'
  523. exit 1
  524. fi
  525. # TODO: Re-enable either in or after #11706.
  526. # spm-source-cron:
  527. # # Don't run on private repo.
  528. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  529. # runs-on: macos-14
  530. # strategy:
  531. # matrix:
  532. # target: [tvOS, macOS, catalyst]
  533. # env:
  534. # FIREBASE_SOURCE_FIRESTORE: 1
  535. # steps:
  536. # - uses: actions/checkout@v4
  537. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  538. # with:
  539. # cache_key: ${{ matrix.os }}
  540. # - name: Initialize xcodebuild
  541. # run: scripts/setup_spm_tests.sh
  542. # - name: Build Test - Binary
  543. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
  544. spm-binary-cron:
  545. # Don't run on private repo.
  546. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  547. runs-on: macos-14
  548. strategy:
  549. matrix:
  550. target: [tvOS, macOS, catalyst]
  551. steps:
  552. - uses: actions/checkout@v4
  553. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  554. with:
  555. cache_key: ${{ matrix.target }}
  556. - name: Initialize xcodebuild
  557. run: scripts/setup_spm_tests.sh
  558. - name: Build Test - Binary
  559. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
  560. # A job that fails if any required job in the test matrix fails,
  561. # to be used as a required check for merging.
  562. check-required-tests:
  563. runs-on: ubuntu-latest
  564. name: Check all required Firestore tests results
  565. needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary]
  566. steps:
  567. - name: Check test matrix
  568. if: needs.*.result == 'failure'
  569. run: exit 1
  570. # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept
  571. # Firebase UI 12
  572. # quickstart:
  573. # # Don't run on private repo unless it is a PR.
  574. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  575. # env:
  576. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  577. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  578. # runs-on: macos-14
  579. # needs: check
  580. # steps:
  581. # - uses: actions/checkout@v4
  582. # - name: Setup quickstart
  583. # run: scripts/setup_quickstart.sh firestore
  584. # - name: Install Secret GoogleService-Info.plist
  585. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  586. # quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  587. # - name: Test swift quickstart
  588. # run: ([ -z $plist_secret ] ||
  589. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore false)