firestore.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # 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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # 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: [macos-14, ubuntu-latest]
  102. env:
  103. MINT_PATH: ${{ github.workspace }}/mint
  104. USE_LATEST_CMAKE: false
  105. runs-on: ${{ matrix.os }}
  106. steps:
  107. - uses: actions/checkout@v4
  108. - name: Prepare ccache
  109. uses: actions/cache@v4
  110. with:
  111. path: ${{ runner.temp }}/ccache
  112. key: firestore-ccache-${{ runner.os }}-${{ github.sha }}
  113. restore-keys: |
  114. firestore-ccache-${{ runner.os }}-
  115. - name: Cache Mint packages
  116. uses: actions/cache@v4
  117. with:
  118. path: ${{ env.MINT_PATH }}
  119. key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
  120. restore-keys: ${{ runner.os }}-mint-
  121. - uses: actions/setup-python@v5
  122. with:
  123. python-version: '3.11'
  124. - name: Setup cmake
  125. uses: jwlawson/actions-setup-cmake@v2
  126. with:
  127. cmake-version: '3.31.1'
  128. - name: Setup build
  129. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  130. - name: Build and test
  131. run: |
  132. export EXPERIMENTAL_MODE=true
  133. export CCACHE_DIR=${{ runner.temp }}/ccache
  134. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  135. cmake-prod-db:
  136. needs: check
  137. # Either a scheduled run from public repo, or a pull request with firestore changes.
  138. if: |
  139. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  140. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  141. strategy:
  142. matrix:
  143. os: [macos-14]
  144. databaseId: [(default), test-db]
  145. env:
  146. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  147. MINT_PATH: ${{ github.workspace }}/mint
  148. TARGET_DATABASE_ID: ${{ matrix.databaseId }}
  149. USE_LATEST_CMAKE: false
  150. runs-on: ${{ matrix.os }}
  151. steps:
  152. - uses: actions/checkout@v4
  153. - name: Prepare ccache
  154. uses: actions/cache@v4
  155. with:
  156. path: ${{ runner.temp }}/ccache
  157. key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }}
  158. restore-keys: |
  159. firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-
  160. - name: Cache Mint packages
  161. uses: actions/cache@v4
  162. with:
  163. path: ${{ env.MINT_PATH }}
  164. key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
  165. restore-keys: ${{ runner.os }}-mint-
  166. - uses: actions/setup-python@v5
  167. with:
  168. python-version: '3.11'
  169. - name: Install Secret GoogleService-Info.plist
  170. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore.plist.gpg \
  171. Firestore/Example/App/GoogleService-Info.plist "$plist_secret"
  172. - name: Install Google Service Account key
  173. run: |
  174. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore-integration.json.gpg \
  175. google-service-account.json "$plist_secret"
  176. # create composite indexes with Terraform
  177. - name: Set up Google Cloud SDK
  178. uses: google-github-actions/setup-gcloud@v1
  179. - name: Setup Terraform
  180. uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2
  181. - name: Terraform Init
  182. run: |
  183. cd Firestore
  184. terraform init
  185. - name: Terraform Apply
  186. run: |
  187. cd Firestore
  188. # Define a temporary file, redirect both stdout and stderr to it
  189. output_file=$(mktemp)
  190. if ! terraform apply -var-file=../google-service-account.json -auto-approve > "$output_file" 2>&1 ; then
  191. cat "$output_file"
  192. if cat "$output_file" | grep -q "index already exists"; then
  193. echo "==================================================================================="
  194. echo "Terraform apply failed due to index already exists; We can safely ignore this error."
  195. echo "==================================================================================="
  196. fi
  197. exit 1
  198. fi
  199. rm -f "$output_file"
  200. env:
  201. GOOGLE_APPLICATION_CREDENTIALS: ../google-service-account.json
  202. continue-on-error: true
  203. - name: Setup cmake
  204. uses: jwlawson/actions-setup-cmake@v2
  205. with:
  206. cmake-version: '3.31.1'
  207. - name: Setup build
  208. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  209. - name: Build and test
  210. run: |
  211. export CCACHE_DIR=${{ runner.temp }}/ccache
  212. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  213. sanitizers-mac:
  214. needs: check
  215. # Either a scheduled run from public repo, or a pull request with firestore changes.
  216. if: |
  217. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  218. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  219. strategy:
  220. matrix:
  221. os: [macos-14]
  222. sanitizer: [asan, tsan]
  223. runs-on: ${{ matrix.os }}
  224. env:
  225. SANITIZERS: ${{ matrix.sanitizer }}
  226. USE_LATEST_CMAKE: false
  227. steps:
  228. - uses: actions/checkout@v4
  229. - name: Prepare ccache
  230. uses: actions/cache@v4
  231. with:
  232. path: ${{ runner.temp }}/ccache
  233. key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }}
  234. restore-keys: |
  235. ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-
  236. - uses: actions/setup-python@v5
  237. with:
  238. python-version: '3.11'
  239. - name: Setup cmake
  240. uses: jwlawson/actions-setup-cmake@v2
  241. with:
  242. cmake-version: '3.31.1'
  243. - name: Setup build
  244. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  245. - name: Build and test
  246. run: |
  247. export EXPERIMENTAL_MODE=true
  248. export CCACHE_DIR=${{ runner.temp }}/ccache
  249. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  250. sanitizers-ubuntu:
  251. needs: check
  252. # Either a scheduled run from public repo, or a pull request with firestore changes.
  253. if: |
  254. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  255. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  256. strategy:
  257. matrix:
  258. os: [ubuntu-latest]
  259. # Excluding TSAN on ubuntu because of the warnings it generates around schedule.cc.
  260. # This could be due to Apple Clang provide additional support for synchronization
  261. # on Apple platforms, which is what we primarily care about.
  262. sanitizer: [asan]
  263. runs-on: ${{ matrix.os }}
  264. env:
  265. SANITIZERS: ${{ matrix.sanitizer }}
  266. ASAN_OPTIONS: detect_leaks=0
  267. USE_LATEST_CMAKE: false
  268. steps:
  269. - uses: actions/checkout@v3
  270. - name: Prepare ccache
  271. uses: actions/cache@v4
  272. with:
  273. path: ${{ runner.temp }}/ccache
  274. key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }}
  275. restore-keys: |
  276. ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-
  277. - uses: actions/setup-python@v5
  278. with:
  279. python-version: '3.11'
  280. - name: Setup cmake
  281. uses: jwlawson/actions-setup-cmake@v2
  282. with:
  283. cmake-version: '3.31.1'
  284. - name: Setup build
  285. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  286. - name: Build and test
  287. run: |
  288. export EXPERIMENTAL_MODE=true
  289. export CCACHE_DIR=${{ runner.temp }}/ccache
  290. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  291. xcodebuild:
  292. needs: check
  293. # Either a scheduled run from public repo, or a pull request with firestore changes.
  294. if: |
  295. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  296. (github.event_name == 'pull_request')
  297. runs-on: macos-15
  298. strategy:
  299. matrix:
  300. target: [iOS, macOS, tvOS]
  301. steps:
  302. - uses: actions/checkout@v4
  303. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  304. with:
  305. cache_key: ${{ matrix.target }}
  306. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  307. - name: Setup build
  308. run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild
  309. - name: Build and test
  310. run: |
  311. export EXPERIMENTAL_MODE=true
  312. scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild
  313. pod-lib-lint:
  314. needs: check
  315. # Either a scheduled run from public repo, or a pull request with firestore changes.
  316. if: |
  317. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  318. (github.event_name == 'pull_request')
  319. runs-on: macos-15
  320. strategy:
  321. matrix:
  322. podspec: [
  323. 'FirebaseFirestoreInternal.podspec',
  324. 'FirebaseFirestore.podspec',
  325. ]
  326. steps:
  327. - uses: actions/checkout@v4
  328. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  329. - name: Setup Bundler
  330. run: ./scripts/setup_bundler.sh
  331. - name: Xcode
  332. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  333. - name: Pod lib lint
  334. # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
  335. run: |
  336. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \
  337. --platforms=ios \
  338. --allow-warnings \
  339. --no-analyze
  340. # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron.
  341. pod-lib-lint-cron:
  342. needs: check
  343. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  344. strategy:
  345. matrix:
  346. podspec: [
  347. 'FirebaseFirestoreInternal.podspec',
  348. 'FirebaseFirestore.podspec',
  349. ]
  350. platforms: [
  351. 'macos',
  352. 'tvos',
  353. 'ios',
  354. ]
  355. flags: [
  356. '--use-static-frameworks',
  357. '',
  358. ]
  359. os: [macos-15, macos-14]
  360. # Skip matrix cells covered by pod-lib-lint job.
  361. exclude:
  362. - os: macos-15
  363. platforms: 'ios'
  364. runs-on: ${{ matrix.os }}
  365. steps:
  366. - uses: actions/checkout@v4
  367. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  368. - name: Setup Bundler
  369. run: ./scripts/setup_bundler.sh
  370. - name: Xcode
  371. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  372. - name: Pod lib lint
  373. # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
  374. run: |
  375. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\
  376. ${{ matrix.flags }} \
  377. --platforms=${{ matrix.platforms }} \
  378. --allow-warnings \
  379. --no-analyze
  380. spm-package-resolved:
  381. runs-on: macos-14
  382. env:
  383. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  384. FIREBASE_SOURCE_FIRESTORE: 1
  385. outputs:
  386. cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  387. steps:
  388. - uses: actions/checkout@v4
  389. - name: Xcode
  390. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  391. - name: Generate Swift Package.resolved
  392. id: swift_package_resolve
  393. run: |
  394. swift package resolve
  395. - name: Generate cache key
  396. id: generate_cache_key
  397. run: |
  398. cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  399. echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  400. - uses: actions/cache/save@v4
  401. id: cache
  402. with:
  403. path: .build
  404. key: ${{ steps.generate_cache_key.outputs.cache_key }}
  405. spm-source:
  406. needs: [check, spm-package-resolved]
  407. # Either a scheduled run from public repo, or a pull request with firestore changes.
  408. if: |
  409. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  410. (github.event_name == 'pull_request')
  411. strategy:
  412. matrix:
  413. include:
  414. - os: macos-14
  415. xcode: Xcode_16.2
  416. target: iOS
  417. - os: macos-15
  418. xcode: Xcode_16.2
  419. target: iOS
  420. - os: macos-15
  421. xcode: Xcode_16.2
  422. target: tvOS
  423. - os: macos-15
  424. xcode: Xcode_16.2
  425. target: macOS
  426. - os: macos-15
  427. xcode: Xcode_16.2
  428. target: catalyst
  429. - os: macos-15
  430. xcode: Xcode_16.2
  431. target: visionOS
  432. runs-on: ${{ matrix.os }}
  433. env:
  434. FIREBASE_SOURCE_FIRESTORE: 1
  435. steps:
  436. - uses: actions/checkout@v4
  437. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  438. with:
  439. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  440. - name: Xcode
  441. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  442. - name: Initialize xcodebuild
  443. run: scripts/setup_spm_tests.sh
  444. - name: iOS Build Test
  445. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
  446. spm-binary:
  447. needs: check
  448. # Either a scheduled run from public repo, or a pull request with firestore changes.
  449. if: |
  450. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  451. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  452. runs-on: macos-15
  453. steps:
  454. - uses: actions/checkout@v4
  455. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  456. with:
  457. cache_key: spm-binary
  458. - name: Xcode
  459. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  460. - name: Initialize xcodebuild
  461. run: scripts/setup_spm_tests.sh
  462. - name: iOS Build Test
  463. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly
  464. check-firestore-internal-public-headers:
  465. needs: check
  466. # Either a scheduled run from public repo, or a pull request with firestore changes.
  467. if: |
  468. (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
  469. (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
  470. runs-on: macos-14
  471. steps:
  472. - uses: actions/checkout@v4
  473. - name: Assert that Firestore and FirestoreInternal have identically named headers.
  474. run: |
  475. fst_dir=Firestore/Source/Public/FirebaseFirestore/
  476. fst_internal_dir=FirebaseFirestoreInternal/FirebaseFirestore/
  477. comparison=$(comm -3 <(ls $fst_dir | sort) <(ls $fst_internal_dir | sort))
  478. if [[ -z "$comparison" ]]; then
  479. echo "Success: Directories '$fst_dir' and '$fst_internal_dir' match."
  480. else
  481. echo "Error: Directories '$fst_dir' and '$fst_internal_dir' differ:"
  482. echo "Files only in '$fst_dir':"
  483. # Files in this set do not start with whitespace. Grep for them and a
  484. # dashed prefix for nicer formatting.
  485. echo "$comparison" | grep -v '^\s' | sed 's/^/- /'
  486. echo "Files only in '$fst_internal_dir':"
  487. # Files in this set start with whitespace. Grep for them and a dashed
  488. # prefix for nicer formatting.
  489. echo "$comparison" | grep '^\s' | sed 's/^ /- /'
  490. exit 1
  491. fi
  492. # TODO: Re-enable either in or after #11706.
  493. # spm-source-cron:
  494. # # Don't run on private repo.
  495. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  496. # runs-on: macos-14
  497. # strategy:
  498. # matrix:
  499. # target: [tvOS, macOS, catalyst]
  500. # env:
  501. # FIREBASE_SOURCE_FIRESTORE: 1
  502. # steps:
  503. # - uses: actions/checkout@v4
  504. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  505. # with:
  506. # cache_key: ${{ matrix.os }}
  507. # - name: Initialize xcodebuild
  508. # run: scripts/setup_spm_tests.sh
  509. # - name: Build Test - Binary
  510. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
  511. spm-binary-cron:
  512. # Don't run on private repo.
  513. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  514. runs-on: macos-15
  515. strategy:
  516. matrix:
  517. target: [tvOS, macOS, catalyst]
  518. steps:
  519. - uses: actions/checkout@v4
  520. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  521. with:
  522. cache_key: ${{ matrix.target }}
  523. - name: Xcode
  524. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  525. - name: Initialize xcodebuild
  526. run: scripts/setup_spm_tests.sh
  527. - name: Build Test - Binary
  528. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
  529. # A job that fails if any required job in the test matrix fails,
  530. # to be used as a required check for merging.
  531. check-required-tests:
  532. runs-on: ubuntu-latest
  533. name: Check all required Firestore tests results
  534. needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary]
  535. steps:
  536. - name: Check test matrix
  537. if: needs.*.result == 'failure'
  538. run: exit 1
  539. # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept
  540. # Firebase UI 12
  541. # quickstart:
  542. # # Don't run on private repo unless it is a PR.
  543. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  544. # env:
  545. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  546. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  547. # runs-on: macos-14
  548. # needs: check
  549. # steps:
  550. # - uses: actions/checkout@v4
  551. # - name: Setup quickstart
  552. # run: scripts/setup_quickstart.sh firestore
  553. # - name: Install Secret GoogleService-Info.plist
  554. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  555. # quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  556. # - name: Test swift quickstart
  557. # run: ([ -z $plist_secret ] ||
  558. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore false)