zip.yml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. # This workflow tests the zip distribution of the SDK.
  2. # There are three ways to configure the source of the zip file for testing:
  3. # 1. To iterate on a PR: Set the `PINNED_RUN_ID` environment variable in this
  4. # file to a successful zip packaging run. This is useful for avoiding
  5. # re-running the packaging jobs on every commit.
  6. # 2. For manual runs: Trigger the workflow via the GitHub UI (`workflow_dispatch`)
  7. # and provide a "Run ID of a previous successful zip workflow" in the input.
  8. # 3. By default (for scheduled and other PR runs): The workflow will build the
  9. # zip from the current commit (HEAD).
  10. name: zip
  11. permissions:
  12. actions: read
  13. contents: read
  14. env:
  15. # When a run_id is specified, build jobs will be skipped and the specified
  16. # run's artifacts will be used for testing.
  17. PINNED_RUN_ID: '17965877651'
  18. on:
  19. pull_request:
  20. paths:
  21. - 'ReleaseTooling/Sources/**'
  22. - '.github/workflows/zip.yml'
  23. - 'scripts/build_non_firebase_sdks.sh'
  24. - 'scripts/build_zip.sh'
  25. - 'scripts/setup_quickstart_framework.sh'
  26. - 'Gemfile*'
  27. # Don't run based on any markdown only changes.
  28. - '!ReleaseTooling/*.md'
  29. schedule:
  30. # Run every day at 9pm (PDT) / 12am (EDT) - cron uses UTC times
  31. - cron: '0 4 * * *'
  32. workflow_dispatch:
  33. inputs:
  34. custom_spec_repos:
  35. description: 'Custom Podspec repos'
  36. required: true
  37. default: 'https://github.com/firebase/SpecsStaging.git'
  38. zip_run_id:
  39. # For example, in the below URL, `17335533279` is the run ID:
  40. # - https://github.com/firebase/firebase-ios-sdk/actions/runs/17335533279
  41. description: 'Run ID of a previous successful zip workflow to use for quickstart testing'
  42. required: false
  43. default: ''
  44. concurrency:
  45. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  46. cancel-in-progress: true
  47. jobs:
  48. should_package:
  49. runs-on: ubuntu-latest
  50. outputs:
  51. should_package: ${{ steps.check.outputs.should_package }}
  52. steps:
  53. - name: Check if packaging should be skipped
  54. id: check
  55. run: |
  56. if [[ -n "${{ env.PINNED_RUN_ID }}" || -n "${{ github.event.inputs.zip_run_id }}" ]]; then
  57. echo "should_package=false" >> $GITHUB_OUTPUT
  58. else
  59. echo "should_package=true" >> $GITHUB_OUTPUT
  60. fi
  61. package-release:
  62. needs: should_package
  63. # Don't run on private repo.
  64. if: |
  65. github.repository == 'firebase/firebase-ios-sdk' &&
  66. contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) &&
  67. needs.should_package.outputs.should_package == 'true'
  68. runs-on: macos-14
  69. steps:
  70. - uses: actions/checkout@v4
  71. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  72. with:
  73. cache_key: package-release
  74. - name: Xcode 16.2
  75. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  76. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  77. - name: Setup Bundler
  78. run: ./scripts/setup_bundler.sh
  79. - name: ZipBuildingTest
  80. run: |
  81. mkdir -p release_zip_dir
  82. sh -x scripts/build_zip.sh release_zip_dir \
  83. "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" \
  84. build-release \
  85. static
  86. - uses: actions/upload-artifact@v4
  87. with:
  88. name: Firebase-release-zip-zip
  89. # Zip the entire output directory since the builder adds subdirectories we don't know the
  90. # name of.
  91. path: release_zip_dir
  92. build:
  93. needs: should_package
  94. # Don't run on private repo unless it is a PR.
  95. if: |
  96. github.repository == 'firebase/firebase-ios-sdk' &&
  97. contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) &&
  98. needs.should_package.outputs.should_package == 'true'
  99. runs-on: macos-14
  100. steps:
  101. - uses: actions/checkout@v4
  102. - name: Xcode 16.2
  103. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  104. - name: Build
  105. run: |
  106. cd ReleaseTooling
  107. swift build -v
  108. package-head:
  109. needs: [build, should_package]
  110. if: needs.should_package.outputs.should_package == 'true'
  111. strategy:
  112. matrix:
  113. linking_type: [static, dynamic]
  114. runs-on: macos-14
  115. steps:
  116. - uses: actions/checkout@v4
  117. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  118. with:
  119. cache_key: package-head
  120. - name: Xcode 16.2
  121. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  122. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  123. - name: Setup Bundler
  124. run: ./scripts/setup_bundler.sh
  125. - name: ZipBuildingTest
  126. run: |
  127. mkdir -p zip_output_dir
  128. sh -x scripts/build_zip.sh \
  129. zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \
  130. build-head \
  131. ${{ matrix.linking_type }}
  132. - uses: actions/upload-artifact@v4
  133. if: always()
  134. with:
  135. name: ${{ matrix.linking_type == 'static' && 'Firebase-actions-dir' || 'Firebase-actions-dir-dynamic' }}
  136. # Zip the entire output directory since the builder adds subdirectories we don't know the
  137. # name of.
  138. path: zip_output_dir
  139. packaging_done:
  140. runs-on: ubuntu-latest
  141. needs: [package-head]
  142. if: always()
  143. outputs:
  144. run_id: ${{ steps.get_run_id.outputs.run_id }}
  145. steps:
  146. - name: Check packaging result
  147. if: ${{ needs.package-head.result == 'failure' }}
  148. run: |
  149. echo "Packaging failed. Aborting."
  150. exit 1
  151. - name: Get Run ID
  152. id: get_run_id
  153. run: |
  154. if [[ -n "${{ github.event.inputs.zip_run_id }}" ]]; then
  155. echo "run_id=${{ github.event.inputs.zip_run_id }}" >> $GITHUB_OUTPUT
  156. elif [[ -n "${{ env.PINNED_RUN_ID }}" ]]; then
  157. echo "run_id=${{ env.PINNED_RUN_ID }}" >> $GITHUB_OUTPUT
  158. else
  159. echo "run_id=${{ github.run_id }}" >> $GITHUB_OUTPUT
  160. fi
  161. check_framework_firestore_symbols:
  162. needs: packaging_done
  163. if: ${{ !cancelled() }}
  164. env:
  165. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  166. runs-on: macos-14
  167. steps:
  168. - name: Xcode 16.2
  169. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  170. - uses: actions/checkout@v4
  171. - name: Get framework dir
  172. uses: actions/download-artifact@v4.1.7
  173. with:
  174. name: Firebase-actions-dir
  175. run-id: ${{ needs.packaging_done.outputs.run_id }}
  176. github-token: ${{ secrets.GITHUB_TOKEN }}
  177. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  178. - name: Setup Bundler
  179. run: ./scripts/setup_bundler.sh
  180. - name: Install xcpretty
  181. run: gem install xcpretty
  182. - name: Move frameworks
  183. run: |
  184. mkdir -p "${HOME}"/ios_frameworks/
  185. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  186. - name: Check linked Firestore.xcframework for unlinked symbols.
  187. run: |
  188. scripts/check_firestore_symbols.sh \
  189. $(pwd) \
  190. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework
  191. quickstart_framework_abtesting:
  192. needs: packaging_done
  193. if: ${{ !cancelled() }}
  194. env:
  195. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  196. SDK: "ABTesting"
  197. strategy:
  198. matrix:
  199. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  200. build-env:
  201. - os: macos-15
  202. xcode: Xcode_16.4
  203. runs-on: ${{ matrix.build-env.os }}
  204. steps:
  205. - uses: actions/checkout@v4
  206. - name: Get framework dir
  207. uses: actions/download-artifact@v4.1.7
  208. with:
  209. name: ${{ matrix.artifact }}
  210. run-id: ${{ needs.packaging_done.outputs.run_id }}
  211. github-token: ${{ secrets.GITHUB_TOKEN }}
  212. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  213. - name: Xcode
  214. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  215. - name: Setup Bundler
  216. run: ./scripts/setup_bundler.sh
  217. - name: Move frameworks
  218. run: |
  219. mkdir -p "${HOME}"/ios_frameworks/
  220. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  221. - name: Setup quickstart
  222. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  223. "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
  224. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \
  225. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \
  226. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \
  227. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \
  228. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework
  229. - name: Install Secret GoogleService-Info.plist
  230. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  231. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  232. - name: Test Quickstart
  233. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  234. - uses: actions/upload-artifact@v4
  235. if: failure()
  236. with:
  237. name: quickstart_artifacts_abtesting_${{ matrix.artifact }}
  238. path: |
  239. quickstart-ios/
  240. !quickstart-ios/**/GoogleService-Info.plist
  241. quickstart_framework_auth:
  242. needs: packaging_done
  243. if: ${{ !cancelled() }}
  244. env:
  245. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  246. SDK: "Authentication"
  247. strategy:
  248. matrix:
  249. os: [macos-15]
  250. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  251. include:
  252. - os: macos-15
  253. xcode: Xcode_16.4
  254. runs-on: ${{ matrix.os }}
  255. steps:
  256. - uses: actions/checkout@v4
  257. - name: Get framework dir
  258. uses: actions/download-artifact@v4.1.7
  259. with:
  260. name: ${{ matrix.artifact }}
  261. run-id: ${{ needs.packaging_done.outputs.run_id }}
  262. github-token: ${{ secrets.GITHUB_TOKEN }}
  263. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  264. - name: Xcode
  265. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  266. - name: Setup Bundler
  267. run: ./scripts/setup_bundler.sh
  268. - name: Move frameworks
  269. run: |
  270. mkdir -p "${HOME}"/ios_frameworks/
  271. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  272. - name: Setup Swift Quickstart
  273. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \
  274. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  275. "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \
  276. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  277. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  278. - name: Install Secret GoogleService-Info.plist
  279. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-authentication.plist.gpg \
  280. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  281. - name: Test Swift Quickstart
  282. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  283. - uses: actions/upload-artifact@v4
  284. if: failure()
  285. with:
  286. name: quickstart_artifacts_auth_${{ matrix.artifact }}
  287. path: |
  288. quickstart-ios/
  289. !quickstart-ios/**/GoogleService-Info.plist
  290. quickstart_framework_config:
  291. needs: packaging_done
  292. if: ${{ !cancelled() }}
  293. env:
  294. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  295. SDK: "Config"
  296. strategy:
  297. matrix:
  298. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  299. build-env:
  300. - os: macos-15
  301. xcode: Xcode_16.4
  302. runs-on: ${{ matrix.build-env.os }}
  303. steps:
  304. - uses: actions/checkout@v4
  305. - name: Get framework dir
  306. uses: actions/download-artifact@v4.1.7
  307. with:
  308. name: ${{ matrix.artifact }}
  309. run-id: ${{ needs.packaging_done.outputs.run_id }}
  310. github-token: ${{ secrets.GITHUB_TOKEN }}
  311. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  312. - name: Xcode
  313. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  314. - name: Setup Bundler
  315. run: ./scripts/setup_bundler.sh
  316. - name: Move frameworks
  317. run: |
  318. mkdir -p "${HOME}"/ios_frameworks/
  319. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  320. - name: Setup Swift Quickstart
  321. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  322. "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
  323. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  324. - name: Install Secret GoogleService-Info.plist
  325. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  326. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  327. - name: Test Swift Quickstart
  328. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  329. - name: Remove data before upload
  330. if: always()
  331. run: scripts/remove_data.sh config
  332. - uses: actions/upload-artifact@v4
  333. if: failure()
  334. with:
  335. name: quickstart_artifacts_config_${{ matrix.artifact }}
  336. path: quickstart-ios/
  337. quickstart_framework_crashlytics:
  338. needs: packaging_done
  339. if: ${{ !cancelled() }}
  340. env:
  341. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  342. SDK: "Crashlytics"
  343. strategy:
  344. matrix:
  345. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  346. build-env:
  347. - os: macos-15
  348. xcode: Xcode_16.4
  349. runs-on: ${{ matrix.build-env.os }}
  350. steps:
  351. - uses: actions/checkout@v4
  352. - name: Get framework dir
  353. uses: actions/download-artifact@v4.1.7
  354. with:
  355. name: ${{ matrix.artifact }}
  356. run-id: ${{ needs.packaging_done.outputs.run_id }}
  357. github-token: ${{ secrets.GITHUB_TOKEN }}
  358. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  359. - name: Xcode
  360. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  361. - name: Setup Bundler
  362. run: ./scripts/setup_bundler.sh
  363. - name: Move frameworks
  364. run: |
  365. mkdir -p "${HOME}"/ios_frameworks/
  366. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  367. - name: Setup quickstart
  368. run: |
  369. rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics*
  370. rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement*
  371. rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAds*
  372. SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  373. "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \
  374. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  375. - name: Add frameworks to Crashlytics watchOS target
  376. run: |
  377. cd quickstart-ios/crashlytics
  378. "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/
  379. - name: Patch Crashlytics Run Script Path
  380. run: scripts/patch_crashlytics_run_path.rb
  381. - name: Install Secret GoogleService-Info.plist
  382. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  383. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  384. - name: Test Quickstart
  385. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  386. - uses: actions/upload-artifact@v4
  387. if: failure()
  388. with:
  389. name: quickstart_artifacts_crashlytics_${{ matrix.artifact }}
  390. path: |
  391. quickstart-ios/
  392. !quickstart-ios/**/GoogleService-Info.plist
  393. quickstart_framework_database:
  394. needs: packaging_done
  395. if: ${{ !cancelled() }}
  396. env:
  397. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  398. SDK: "Database"
  399. strategy:
  400. matrix:
  401. os: [macos-14]
  402. xcode: [Xcode_16.2]
  403. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  404. runs-on: ${{ matrix.os }}
  405. steps:
  406. - uses: actions/checkout@v4
  407. - name: Get framework dir
  408. uses: actions/download-artifact@v4.1.7
  409. with:
  410. name: ${{ matrix.artifact }}
  411. run-id: ${{ needs.packaging_done.outputs.run_id }}
  412. github-token: ${{ secrets.GITHUB_TOKEN }}
  413. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  414. - name: Xcode
  415. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  416. - name: Setup Bundler
  417. run: ./scripts/setup_bundler.sh
  418. - name: Move frameworks
  419. run: |
  420. mkdir -p "${HOME}"/ios_frameworks/
  421. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  422. - name: Setup quickstart
  423. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \
  424. "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \
  425. "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \
  426. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
  427. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  428. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  429. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  430. - name: Install Secret GoogleService-Info.plist
  431. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \
  432. quickstart-ios/database/GoogleService-Info.plist "$plist_secret"
  433. - name: Test Quickstart
  434. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  435. - uses: actions/upload-artifact@v4
  436. if: failure()
  437. with:
  438. name: quickstart_artifacts_database_${{ matrix.artifact }}
  439. path: |
  440. quickstart-ios/
  441. !quickstart-ios/**/GoogleService-Info.plist
  442. quickstart_framework_firestore:
  443. needs: packaging_done
  444. if: ${{ !cancelled() }}
  445. env:
  446. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  447. SDK: "Firestore"
  448. strategy:
  449. matrix:
  450. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  451. build-env:
  452. - os: macos-15
  453. xcode: Xcode_16.4
  454. runs-on: ${{ matrix.build-env.os }}
  455. steps:
  456. - uses: actions/checkout@v4
  457. - name: Get framework dir
  458. uses: actions/download-artifact@v4.1.7
  459. with:
  460. name: ${{ matrix.artifact }}
  461. run-id: ${{ needs.packaging_done.outputs.run_id }}
  462. github-token: ${{ secrets.GITHUB_TOKEN }}
  463. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  464. - name: Xcode
  465. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  466. - name: Setup Bundler
  467. run: ./scripts/setup_bundler.sh
  468. - name: Move frameworks
  469. run: |
  470. mkdir -p "${HOME}"/ios_frameworks/
  471. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  472. - name: Setup quickstart
  473. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \
  474. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  475. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
  476. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  477. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  478. - name: Upload build logs on failure
  479. if: failure()
  480. uses: actions/upload-artifact@v4
  481. with:
  482. name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }}
  483. path: sdk_zip/build_logs/
  484. - name: Install Secret GoogleService-Info.plist
  485. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  486. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  487. - name: Test Quickstart
  488. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  489. - name: Remove data before upload and zip directory to reduce upload size.
  490. if: always()
  491. run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/
  492. - uses: actions/upload-artifact@v4
  493. if: failure()
  494. with:
  495. name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }}
  496. path: quickstart_artifacts_firestore.zip
  497. quickstart_framework_inappmessaging:
  498. needs: packaging_done
  499. if: ${{ !cancelled() }}
  500. env:
  501. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  502. SDK: "InAppMessaging"
  503. strategy:
  504. matrix:
  505. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  506. build-env:
  507. - os: macos-15
  508. xcode: Xcode_16.4
  509. runs-on: ${{ matrix.build-env.os }}
  510. steps:
  511. - uses: actions/checkout@v4
  512. - name: Get framework dir
  513. uses: actions/download-artifact@v4.1.7
  514. with:
  515. name: ${{ matrix.artifact }}
  516. run-id: ${{ needs.packaging_done.outputs.run_id }}
  517. github-token: ${{ secrets.GITHUB_TOKEN }}
  518. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  519. - name: Xcode
  520. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  521. - name: Setup Bundler
  522. run: ./scripts/setup_bundler.sh
  523. - name: Move frameworks
  524. run: |
  525. mkdir -p "${HOME}"/ios_frameworks/
  526. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  527. - name: Setup quickstart
  528. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  529. "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \
  530. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  531. - name: Install Secret GoogleService-Info.plist
  532. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  533. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  534. - name: Test Swift Quickstart
  535. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  536. - uses: actions/upload-artifact@v4
  537. if: failure()
  538. with:
  539. name: quickstart_artifacts_inappmessaging_${{ matrix.artifact }}
  540. path: |
  541. quickstart-ios/
  542. !quickstart-ios/**/GoogleService-Info.plist
  543. quickstart_framework_messaging:
  544. needs: packaging_done
  545. if: ${{ !cancelled() }}
  546. env:
  547. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  548. SDK: "Messaging"
  549. strategy:
  550. matrix:
  551. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  552. build-env:
  553. - os: macos-15
  554. xcode: Xcode_16.4
  555. runs-on: ${{ matrix.build-env.os }}
  556. steps:
  557. - uses: actions/checkout@v4
  558. - name: Get framework dir
  559. uses: actions/download-artifact@v4.1.7
  560. with:
  561. name: ${{ matrix.artifact }}
  562. run-id: ${{ needs.packaging_done.outputs.run_id }}
  563. github-token: ${{ secrets.GITHUB_TOKEN }}
  564. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  565. - name: Xcode
  566. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  567. - name: Setup Bundler
  568. run: ./scripts/setup_bundler.sh
  569. - name: Move frameworks
  570. run: |
  571. mkdir -p "${HOME}"/ios_frameworks/
  572. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  573. - name: Setup quickstart
  574. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  575. "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \
  576. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  577. - name: Install Secret GoogleService-Info.plist
  578. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  579. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  580. - name: Test Quickstart
  581. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  582. - uses: actions/upload-artifact@v4
  583. if: failure()
  584. with:
  585. name: quickstart_artifacts_messaging_${{ matrix.artifact }}
  586. path: |
  587. quickstart-ios/
  588. !quickstart-ios/**/GoogleService-Info.plist
  589. quickstart_framework_storage:
  590. needs: packaging_done
  591. if: ${{ !cancelled() }}
  592. env:
  593. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  594. SDK: "Storage"
  595. strategy:
  596. matrix:
  597. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  598. build-env:
  599. - os: macos-15
  600. xcode: Xcode_16.4
  601. runs-on: ${{ matrix.build-env.os }}
  602. steps:
  603. - uses: actions/checkout@v4
  604. - name: Get framework dir
  605. uses: actions/download-artifact@v4.1.7
  606. with:
  607. name: ${{ matrix.artifact }}
  608. run-id: ${{ needs.packaging_done.outputs.run_id }}
  609. github-token: ${{ secrets.GITHUB_TOKEN }}
  610. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  611. - name: Xcode
  612. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  613. - name: Setup Bundler
  614. run: ./scripts/setup_bundler.sh
  615. - name: Move frameworks
  616. run: |
  617. mkdir -p "${HOME}"/ios_frameworks/
  618. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  619. - name: Setup quickstart
  620. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  621. "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \
  622. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  623. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  624. - name: Install Secret GoogleService-Info.plist
  625. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  626. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  627. - name: Test Quickstart
  628. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  629. - uses: actions/upload-artifact@v4
  630. if: failure()
  631. with:
  632. name: quickstart_artifacts_storage_${{ matrix.artifact }}
  633. path: |
  634. quickstart-ios/
  635. !quickstart-ios/**/GoogleService-Info.plist