zip.yml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. name: zip
  2. on:
  3. pull_request:
  4. paths:
  5. - 'ReleaseTooling/Sources/**'
  6. - '.github/workflows/zip.yml'
  7. - 'scripts/build_non_firebase_sdks.sh'
  8. - 'Gemfile*'
  9. # Don't run based on any markdown only changes.
  10. - '!ReleaseTooling/*.md'
  11. schedule:
  12. # Run every day at 10pm(PST) - cron uses UTC times
  13. - cron: '0 6 * * *'
  14. workflow_dispatch:
  15. inputs:
  16. custom_spec_repos:
  17. description: 'Custom Podspec repos'
  18. required: true
  19. default: 'https://github.com/firebase/SpecsStaging.git'
  20. jobs:
  21. # TODO: Reenable package-release once v9 merges to master.
  22. # package-release:
  23. # # Don't run on private repo.
  24. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  25. # runs-on: macos-11
  26. # steps:
  27. # - uses: actions/checkout@v2
  28. # - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  29. # with:
  30. # cache_key: ${{ matrix.os }}
  31. # - name: Xcode 13.2.1
  32. # run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer
  33. # - name: Setup Bundler
  34. # run: ./scripts/setup_bundler.sh
  35. # - name: ZipBuildingTest
  36. # run: |
  37. # mkdir -p release_zip_dir
  38. # sh -x scripts/build_zip.sh release_zip_dir \
  39. # "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}"
  40. # - uses: actions/upload-artifact@v1
  41. # with:
  42. # name: Firebase-release-zip-zip
  43. # # Zip the entire output directory since the builder adds subdirectories we don't know the
  44. # # name of.
  45. # path: release_zip_dir
  46. build:
  47. # Don't run on private repo unless it is a PR.
  48. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  49. runs-on: macos-11
  50. steps:
  51. - uses: actions/checkout@v2
  52. - name: Xcode 13.2.1
  53. run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer
  54. - name: Build
  55. run: |
  56. cd ReleaseTooling
  57. swift build -v
  58. package-head:
  59. # Don't run on private repo.
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  61. needs: build
  62. runs-on: macos-11
  63. steps:
  64. - uses: actions/checkout@v2
  65. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  66. with:
  67. cache_key: ${{ matrix.os }}
  68. - name: Xcode 13.2.1
  69. run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer
  70. - name: Setup Bundler
  71. run: ./scripts/setup_bundler.sh
  72. - name: ZipBuildingTest
  73. run: |
  74. mkdir -p zip_output_dir
  75. sh -x scripts/build_zip.sh \
  76. zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \
  77. build-head
  78. - uses: actions/upload-artifact@v1
  79. with:
  80. name: Firebase-actions-dir
  81. # Zip the entire output directory since the builder adds subdirectories we don't know the
  82. # name of.
  83. path: zip_output_dir
  84. quickstart_framework_abtesting:
  85. # Don't run on private repo.
  86. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  87. needs: package-head
  88. env:
  89. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  90. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. FRAMEWORK_DIR: "Firebase-actions-dir"
  92. SDK: "ABTesting"
  93. runs-on: macos-11
  94. steps:
  95. - uses: actions/checkout@v2
  96. - name: Get framework dir
  97. uses: actions/download-artifact@v1
  98. with:
  99. name: Firebase-actions-dir
  100. - name: Move frameworks
  101. run: |
  102. mkdir -p "${HOME}"/ios_frameworks/
  103. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  104. - name: Setup quickstart
  105. env:
  106. LEGACY: true
  107. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  108. "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
  109. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \
  110. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/PromisesObjC.xcframework \
  111. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \
  112. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework
  113. - name: Install Secret GoogleService-Info.plist
  114. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  115. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  116. - name: Test Quickstart
  117. env:
  118. LEGACY: true
  119. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  120. - name: Remove data before upload
  121. env:
  122. LEGACY: true
  123. if: ${{ failure() }}
  124. run: scripts/remove_data.sh abtesting
  125. - uses: actions/upload-artifact@v2
  126. if: ${{ failure() }}
  127. with:
  128. name: quickstart_artifacts_abtesting
  129. path: quickstart-ios/
  130. quickstart_framework_auth:
  131. # Don't run on private repo.
  132. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  133. needs: package-head
  134. env:
  135. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  136. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  137. FRAMEWORK_DIR: "Firebase-actions-dir"
  138. SDK: "Authentication"
  139. runs-on: macos-11
  140. steps:
  141. - uses: actions/checkout@v2
  142. - name: Get framework dir
  143. uses: actions/download-artifact@v1
  144. with:
  145. name: Firebase-actions-dir
  146. - name: Move frameworks
  147. run: |
  148. mkdir -p "${HOME}"/ios_frameworks/
  149. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  150. - name: Setup Swift Quickstart
  151. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \
  152. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  153. "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \
  154. "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \
  155. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  156. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  157. - name: Install Secret GoogleService-Info.plist
  158. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  159. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  160. - name: Test Swift Quickstart
  161. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  162. - name: Remove data before upload
  163. if: ${{ failure() }}
  164. run: scripts/remove_data.sh authentiation
  165. - uses: actions/upload-artifact@v2
  166. if: ${{ failure() }}
  167. with:
  168. name: quickstart_artifacts_auth
  169. path: quickstart-ios/
  170. quickstart_framework_config:
  171. # Don't run on private repo.
  172. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  173. needs: package-head
  174. env:
  175. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  176. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  177. FRAMEWORK_DIR: "Firebase-actions-dir"
  178. SDK: "Config"
  179. runs-on: macos-11
  180. steps:
  181. - uses: actions/checkout@v2
  182. - name: Get framework dir
  183. uses: actions/download-artifact@v1
  184. with:
  185. name: Firebase-actions-dir
  186. - name: Move frameworks
  187. run: |
  188. mkdir -p "${HOME}"/ios_frameworks/
  189. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  190. - name: Setup Swift Quickstart
  191. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  192. "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
  193. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  194. - name: Install Secret GoogleService-Info.plist
  195. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  196. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  197. - name: Test Swift Quickstart
  198. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  199. - name: Remove data before upload
  200. if: ${{ failure() }}
  201. run: scripts/remove_data.sh config
  202. - uses: actions/upload-artifact@v2
  203. if: ${{ failure() }}
  204. with:
  205. name: quickstart_artifacts_config
  206. path: quickstart-ios/
  207. quickstart_framework_crashlytics:
  208. # Don't run on private repo.
  209. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  210. needs: package-head
  211. env:
  212. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  213. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  214. FRAMEWORK_DIR: "Firebase-actions-dir"
  215. SDK: "Crashlytics"
  216. runs-on: macos-11
  217. steps:
  218. - uses: actions/checkout@v2
  219. - name: Get framework dir
  220. uses: actions/download-artifact@v1
  221. with:
  222. name: Firebase-actions-dir
  223. - name: Move frameworks
  224. run: |
  225. mkdir -p "${HOME}"/ios_frameworks/
  226. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  227. - name: Setup quickstart
  228. env:
  229. LEGACY: true
  230. run: |
  231. SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  232. "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \
  233. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  234. cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart
  235. cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart
  236. chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/run
  237. chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/upload-symbols
  238. # TODO(#8057): Restore Swift Quickstart
  239. # - name: Setup swift quickstart
  240. # env:
  241. # LEGACY: true
  242. # run: |
  243. # SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="ReachabilitySwift" scripts/setup_quickstart_framework.sh \
  244. # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/*
  245. - name: Install Secret GoogleService-Info.plist
  246. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  247. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  248. - name: Test Quickstart
  249. env:
  250. LEGACY: true
  251. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  252. # TODO(#8057): Restore Swift Quickstart
  253. # - name: Test Swift Quickstart
  254. # env:
  255. # LEGACY: true
  256. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  257. - name: Remove data before upload
  258. env:
  259. LEGACY: true
  260. if: ${{ failure() }}
  261. run: scripts/remove_data.sh crashlytics
  262. - uses: actions/upload-artifact@v2
  263. if: ${{ failure() }}
  264. with:
  265. name: quickstart_artifacts_crashlytics
  266. path: quickstart-ios/
  267. quickstart_framework_database:
  268. # Don't run on private repo.
  269. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  270. needs: package-head
  271. env:
  272. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  273. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  274. FRAMEWORK_DIR: "Firebase-actions-dir"
  275. SDK: "Database"
  276. runs-on: macos-11
  277. steps:
  278. - uses: actions/checkout@v2
  279. - name: Get framework dir
  280. uses: actions/download-artifact@v1
  281. with:
  282. name: Firebase-actions-dir
  283. - name: Move frameworks
  284. run: |
  285. mkdir -p "${HOME}"/ios_frameworks/
  286. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  287. - name: Setup quickstart
  288. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \
  289. "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \
  290. "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \
  291. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
  292. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  293. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  294. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  295. - name: Install Secret GoogleService-Info.plist
  296. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \
  297. quickstart-ios/database/GoogleService-Info.plist "$plist_secret"
  298. - name: Test Quickstart
  299. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  300. - name: Remove data before upload
  301. if: ${{ failure() }}
  302. run: scripts/remove_data.sh database
  303. - uses: actions/upload-artifact@v2
  304. if: ${{ failure() }}
  305. with:
  306. name: quickstart_artifacts database
  307. path: quickstart-ios/
  308. quickstart_framework_dynamiclinks:
  309. # Don't run on private repo.
  310. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  311. needs: package-head
  312. env:
  313. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  314. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  315. FRAMEWORK_DIR: "Firebase-actions-dir"
  316. SDK: "DynamicLinks"
  317. runs-on: macos-11
  318. steps:
  319. - uses: actions/checkout@v2
  320. - name: Get framework dir
  321. uses: actions/download-artifact@v1
  322. with:
  323. name: Firebase-actions-dir
  324. - name: Move frameworks
  325. run: |
  326. mkdir -p "${HOME}"/ios_frameworks/
  327. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  328. - name: Setup Objc Quickstart
  329. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  330. "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \
  331. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  332. - name: Setup Swift Quickstart
  333. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  334. - name: Update Environment Variable For DynamicLinks
  335. run: |
  336. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  337. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  338. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  339. - name: Install Secret GoogleService-Info.plist
  340. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  341. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  342. - name: Test Objc Quickstart
  343. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  344. - name: Test Swift Quickstart
  345. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  346. - name: Remove data before upload
  347. if: ${{ failure() }}
  348. run: scripts/remove_data.sh dynamiclinks
  349. - uses: actions/upload-artifact@v2
  350. if: ${{ failure() }}
  351. with:
  352. name: quickstart_artifacts_dynamiclinks
  353. path: quickstart-ios/
  354. quickstart_framework_firestore:
  355. # Don't run on private repo.
  356. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  357. needs: package-head
  358. env:
  359. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  360. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  361. FRAMEWORK_DIR: "Firebase-actions-dir"
  362. SDK: "Firestore"
  363. runs-on: macos-11
  364. steps:
  365. - uses: actions/checkout@v2
  366. - name: Get framework dir
  367. uses: actions/download-artifact@v1
  368. with:
  369. name: Firebase-actions-dir
  370. - name: Move frameworks
  371. run: |
  372. mkdir -p "${HOME}"/ios_frameworks/
  373. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  374. - name: Setup quickstart
  375. run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \
  376. "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \
  377. "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \
  378. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  379. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  380. - name: Install Secret GoogleService-Info.plist
  381. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  382. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  383. - name: Test Quickstart
  384. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  385. - name: Remove data before upload
  386. if: ${{ failure() }}
  387. run: scripts/remove_data.sh firestore
  388. - uses: actions/upload-artifact@v2
  389. if: ${{ failure() }}
  390. with:
  391. name: quickstart_artifacts_firestore
  392. path: quickstart-ios/
  393. quickstart_framework_inappmessaging:
  394. # Don't run on private repo.
  395. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  396. needs: package-head
  397. env:
  398. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  399. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  400. FRAMEWORK_DIR: "Firebase-actions-dir"
  401. SDK: "InAppMessaging"
  402. runs-on: macos-11
  403. steps:
  404. - uses: actions/checkout@v2
  405. - name: Get framework dir
  406. uses: actions/download-artifact@v1
  407. with:
  408. name: Firebase-actions-dir
  409. - name: Move frameworks
  410. run: |
  411. mkdir -p "${HOME}"/ios_frameworks/
  412. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  413. - name: Setup quickstart
  414. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  415. "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \
  416. "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \
  417. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  418. - name: Setup swift quickstart
  419. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  420. - name: Install Secret GoogleService-Info.plist
  421. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  422. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  423. - name: Test Quickstart
  424. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  425. - name: Test Swift Quickstart
  426. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  427. - name: Remove data before upload
  428. if: ${{ failure() }}
  429. run: scripts/remove_data.sh inappmessaging
  430. - uses: actions/upload-artifact@v2
  431. if: ${{ failure() }}
  432. with:
  433. name: quickstart_artifacts_ihappmessaging
  434. path: quickstart-ios/
  435. quickstart_framework_messaging:
  436. # Don't run on private repo.
  437. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  438. needs: package-head
  439. env:
  440. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  441. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  442. FRAMEWORK_DIR: "Firebase-actions-dir"
  443. SDK: "Messaging"
  444. runs-on: macos-11
  445. steps:
  446. - uses: actions/checkout@v2
  447. - name: Get framework dir
  448. uses: actions/download-artifact@v1
  449. with:
  450. name: Firebase-actions-dir
  451. - name: Move frameworks
  452. run: |
  453. mkdir -p "${HOME}"/ios_frameworks/
  454. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  455. - name: Setup quickstart
  456. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  457. "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \
  458. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  459. - name: Setup swift quickstart
  460. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  461. - name: Install Secret GoogleService-Info.plist
  462. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  463. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  464. - name: Test Quickstart
  465. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  466. - name: Test Swift Quickstart
  467. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  468. - name: Remove data before upload
  469. if: ${{ failure() }}
  470. run: scripts/remove_data.sh messaging
  471. - uses: actions/upload-artifact@v2
  472. if: ${{ failure() }}
  473. with:
  474. name: quickstart_artifacts_messaging
  475. path: quickstart-ios/
  476. quickstart_framework_storage:
  477. # Don't run on private repo.
  478. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  479. needs: package-head
  480. env:
  481. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  482. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  483. FRAMEWORK_DIR: "Firebase-actions-dir"
  484. SDK: "Storage"
  485. runs-on: macos-11
  486. steps:
  487. - uses: actions/checkout@v2
  488. - name: Get framework dir
  489. uses: actions/download-artifact@v1
  490. with:
  491. name: Firebase-actions-dir
  492. - name: Move frameworks
  493. run: |
  494. mkdir -p "${HOME}"/ios_frameworks/
  495. find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  496. - name: Setup quickstart
  497. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  498. "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \
  499. "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \
  500. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  501. - name: Setup swift quickstart
  502. run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh
  503. - name: Install Secret GoogleService-Info.plist
  504. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  505. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  506. - name: Test Quickstart
  507. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  508. - name: Test Swift Quickstart
  509. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift)
  510. - name: Remove data before upload
  511. if: ${{ failure() }}
  512. run: scripts/remove_data.sh storage
  513. - uses: actions/upload-artifact@v2
  514. if: ${{ failure() }}
  515. with:
  516. name: quickstart_artifacts_storage
  517. path: quickstart-ios/