zip.yml 26 KB

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