zip.yml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  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_firebaseai:
  388. needs: package-head
  389. if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
  390. env:
  391. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  392. SDK: "FirebaseAI"
  393. # This is a workaround to use the FirebaseAIExampleZip scheme that does not have the SPM dependency.
  394. SWIFT_SUFFIX: "Zip"
  395. strategy:
  396. matrix:
  397. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  398. build-env:
  399. - os: macos-15
  400. xcode: Xcode_16.4
  401. runs-on: ${{ matrix.build-env.os }}
  402. steps:
  403. - uses: actions/checkout@v4
  404. - name: Get framework dir
  405. uses: actions/download-artifact@v4.1.7
  406. with:
  407. name: ${{ matrix.artifact }}
  408. run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
  409. github-token: ${{ secrets.GITHUB_TOKEN }}
  410. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  411. - name: Xcode
  412. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  413. - name: Setup Bundler
  414. run: ./scripts/setup_bundler.sh
  415. - name: Move frameworks
  416. run: |
  417. mkdir -p "${HOME}"/ios_frameworks/
  418. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  419. - uses: actions/checkout@v4
  420. - name: Setup quickstart
  421. run: SAMPLE="$SDK" TARGET="${SDK}ExampleZip" scripts/setup_quickstart_framework.sh \
  422. "${HOME}"/ios_frameworks/Firebase/FirebaseAILogic/* \
  423. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  424. - name: Install Secret GoogleService-Info.plist
  425. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info.plist.gpg \
  426. quickstart-ios/firebaseai/GoogleService-Info.plist "$plist_secret"
  427. - name: Test Quickstart
  428. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  429. - name: Remove data before upload
  430. if: ${{ failure() }}
  431. run: scripts/remove_data.sh firebaseai
  432. - uses: actions/upload-artifact@v4
  433. if: ${{ failure() }}
  434. with:
  435. name: quickstart_artifacts_firebaseai
  436. path: quickstart-ios/
  437. quickstart_framework_firestore:
  438. needs: package-head
  439. if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
  440. env:
  441. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  442. SDK: "Firestore"
  443. strategy:
  444. matrix:
  445. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  446. build-env:
  447. - os: macos-15
  448. xcode: Xcode_16.4
  449. runs-on: ${{ matrix.build-env.os }}
  450. steps:
  451. - uses: actions/checkout@v4
  452. - name: Get framework dir
  453. uses: actions/download-artifact@v4.1.7
  454. with:
  455. name: ${{ matrix.artifact }}
  456. run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
  457. github-token: ${{ secrets.GITHUB_TOKEN }}
  458. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  459. - name: Xcode
  460. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  461. - name: Setup Bundler
  462. run: ./scripts/setup_bundler.sh
  463. - name: Move frameworks
  464. run: |
  465. mkdir -p "${HOME}"/ios_frameworks/
  466. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  467. - uses: actions/checkout@v4
  468. - name: Setup quickstart
  469. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \
  470. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  471. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
  472. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  473. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  474. - name: Upload build logs on failure
  475. if: ${{ failure() }}
  476. uses: actions/upload-artifact@v4
  477. with:
  478. name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }}
  479. path: sdk_zip/build_logs/
  480. - name: Install Secret GoogleService-Info.plist
  481. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  482. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  483. - name: Test Quickstart
  484. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  485. - name: Remove data before upload and zip directory to reduce upload size.
  486. if: ${{ failure() }}
  487. run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/
  488. - uses: actions/upload-artifact@v4
  489. if: ${{ failure() }}
  490. with:
  491. name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }}
  492. path: quickstart_artifacts_firestore.zip
  493. check_framework_firestore_symbols:
  494. needs: package-head
  495. if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
  496. env:
  497. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  498. runs-on: macos-14
  499. steps:
  500. - name: Xcode 16.2
  501. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  502. - uses: actions/checkout@v4
  503. - name: Get framework dir
  504. uses: actions/download-artifact@v4.1.7
  505. with:
  506. name: Firebase-actions-dir
  507. run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
  508. github-token: ${{ secrets.GITHUB_TOKEN }}
  509. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  510. - name: Setup Bundler
  511. run: ./scripts/setup_bundler.sh
  512. - name: Install xcpretty
  513. run: gem install xcpretty
  514. - name: Move frameworks
  515. run: |
  516. mkdir -p "${HOME}"/ios_frameworks/
  517. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  518. - uses: actions/checkout@v4
  519. - name: Check linked Firestore.xcframework for unlinked symbols.
  520. run: |
  521. scripts/check_firestore_symbols.sh \
  522. $(pwd) \
  523. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework
  524. quickstart_framework_inappmessaging:
  525. needs: package-head
  526. if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
  527. env:
  528. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  529. SDK: "InAppMessaging"
  530. strategy:
  531. matrix:
  532. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  533. build-env:
  534. - os: macos-15
  535. xcode: Xcode_16.4
  536. runs-on: ${{ matrix.build-env.os }}
  537. steps:
  538. - uses: actions/checkout@v4
  539. - name: Get framework dir
  540. uses: actions/download-artifact@v4.1.7
  541. with:
  542. name: ${{ matrix.artifact }}
  543. run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
  544. github-token: ${{ secrets.GITHUB_TOKEN }}
  545. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  546. - name: Xcode
  547. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  548. - name: Setup Bundler
  549. run: ./scripts/setup_bundler.sh
  550. - name: Move frameworks
  551. run: |
  552. mkdir -p "${HOME}"/ios_frameworks/
  553. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  554. - uses: actions/checkout@v4
  555. - name: Setup quickstart
  556. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  557. "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \
  558. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  559. - name: Setup swift quickstart
  560. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  561. - name: Install Secret GoogleService-Info.plist
  562. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  563. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  564. - name: Test Quickstart
  565. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  566. - name: Test Swift Quickstart
  567. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  568. - name: Remove data before upload
  569. if: ${{ failure() }}
  570. run: scripts/remove_data.sh inappmessaging
  571. - uses: actions/upload-artifact@v4
  572. if: ${{ failure() }}
  573. with:
  574. name: quickstart_artifacts_inappmessaging
  575. path: quickstart-ios/
  576. quickstart_framework_messaging:
  577. needs: package-head
  578. if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
  579. env:
  580. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  581. SDK: "Messaging"
  582. strategy:
  583. matrix:
  584. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  585. build-env:
  586. - os: macos-15
  587. xcode: Xcode_16.4
  588. runs-on: ${{ matrix.build-env.os }}
  589. steps:
  590. - uses: actions/checkout@v4
  591. - name: Get framework dir
  592. uses: actions/download-artifact@v4.1.7
  593. with:
  594. name: ${{ matrix.artifact }}
  595. run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
  596. github-token: ${{ secrets.GITHUB_TOKEN }}
  597. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  598. - name: Xcode
  599. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  600. - name: Setup Bundler
  601. run: ./scripts/setup_bundler.sh
  602. - name: Move frameworks
  603. run: |
  604. mkdir -p "${HOME}"/ios_frameworks/
  605. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  606. - uses: actions/checkout@v4
  607. - name: Setup quickstart
  608. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  609. "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \
  610. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  611. - name: Setup swift quickstart
  612. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  613. - name: Add frameworks to Crashlytics watchOS target
  614. run: |
  615. cd quickstart-ios/messaging
  616. "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk Messaging --target NotificationServiceExtension --framework_path Firebase/
  617. - name: Install Secret GoogleService-Info.plist
  618. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  619. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  620. - name: Test Quickstart
  621. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  622. - name: Test Swift Quickstart
  623. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  624. - name: Remove data before upload
  625. if: ${{ failure() }}
  626. run: scripts/remove_data.sh messaging
  627. - uses: actions/upload-artifact@v4
  628. if: ${{ failure() }}
  629. with:
  630. name: quickstart_artifacts_messaging
  631. path: quickstart-ios/
  632. quickstart_framework_storage:
  633. needs: package-head
  634. if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
  635. env:
  636. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  637. SDK: "Storage"
  638. strategy:
  639. matrix:
  640. artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
  641. build-env:
  642. - os: macos-15
  643. xcode: Xcode_16.4
  644. runs-on: ${{ matrix.build-env.os }}
  645. steps:
  646. - uses: actions/checkout@v4
  647. - name: Get framework dir
  648. uses: actions/download-artifact@v4.1.7
  649. with:
  650. name: ${{ matrix.artifact }}
  651. run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
  652. github-token: ${{ secrets.GITHUB_TOKEN }}
  653. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  654. - name: Xcode
  655. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  656. - name: Setup Bundler
  657. run: ./scripts/setup_bundler.sh
  658. - name: Move frameworks
  659. run: |
  660. mkdir -p "${HOME}"/ios_frameworks/
  661. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  662. - uses: actions/checkout@v4
  663. - name: Setup quickstart
  664. env:
  665. LEGACY: true
  666. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  667. "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \
  668. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  669. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  670. - name: Setup swift quickstart
  671. env:
  672. LEGACY: true
  673. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  674. - name: Install Secret GoogleService-Info.plist
  675. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  676. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  677. - name: Test Quickstart
  678. env:
  679. LEGACY: true
  680. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  681. - name: Test Swift Quickstart
  682. env:
  683. LEGACY: true
  684. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  685. - name: Remove data before upload
  686. env:
  687. LEGACY: true
  688. if: ${{ failure() }}
  689. run: scripts/remove_data.sh storage
  690. - uses: actions/upload-artifact@v4
  691. if: ${{ failure() }}
  692. with:
  693. name: quickstart_artifacts_storage
  694. path: quickstart-ios/