zip.yml 28 KB

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