prerelease.yml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. name: prerelease
  2. on:
  3. pull_request:
  4. # closed will be triggered when a pull request is merged. This is to keep https://github.com/firebase/SpecsTesting up to date.
  5. types: [closed]
  6. workflow_dispatch:
  7. schedule:
  8. # Run every day at 9pm (PST) - cron uses UTC times
  9. - cron: '0 5 * * *'
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  12. cancel-in-progress: true
  13. jobs:
  14. specs_checking:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  17. runs-on: macos-12
  18. env:
  19. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  20. # The SDK repo will be cloned to this dir and podspecs from
  21. # 'podspec_repo_branch' of this repo will be validated and pushed to the
  22. # testing repo.
  23. local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
  24. local_repo: specstesting
  25. podspec_repo_branch: master
  26. outputs:
  27. matrix: ${{ steps.generate_matrix.outputs.matrix }}
  28. steps:
  29. - name: Checkout code
  30. uses: actions/checkout@v3
  31. - name: Generate matrix
  32. id: generate_matrix
  33. run: |
  34. cd "${GITHUB_WORKSPACE}/ReleaseTooling"
  35. swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation
  36. echo "::set-output name=matrix::{\"include\":$( cat output.json )}"
  37. - name: Get token
  38. run: |
  39. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/oss-bot-access.txt.gpg \
  40. oss-bot-access.txt "$bot_token_secret"
  41. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  42. bot-access.txt "$bot_token_secret"
  43. - name: Update SpecsTesting repo setup
  44. run: |
  45. ossbotaccess=`cat oss-bot-access.txt`
  46. BOT_TOKEN="${ossbotaccess}" test_version="${nightly_version}" sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" local_sdk_repo_dir="${local_sdk_repo_dir}" podspec_repo_branch="${podspec_repo_branch}" scripts/release_testing_setup.sh prerelease_testing
  47. - name: Clean spec repo
  48. run: |
  49. ossbotaccess=`cat oss-bot-access.txt`
  50. git clone --quiet https://${ossbotaccess}@github.com/Firebase/SpecsTesting.git "${local_repo}"
  51. cd "${local_repo}"
  52. # Remove all unhidden dirs, i.e. all podspec dir from the spec repo.
  53. rm -Rf -- */
  54. git add .
  55. # commit without diff will throw an error. `git diff --exit-code` can avoid such error.
  56. git diff --staged --exit-code || git commit -m "Empty spec repo."
  57. git push
  58. - name: Clean Artifacts
  59. if: ${{ always() }}
  60. run: |
  61. rm -rf oss-bot-access.txt
  62. - uses: actions/upload-artifact@v3
  63. with:
  64. name: firebase-ios-sdk
  65. path: |
  66. ${{ env.local_sdk_repo_dir }}/*.podspec
  67. ${{ env.local_sdk_repo_dir }}/*.podspec.json
  68. buildup_SpecsTesting_repo_FirebaseCore:
  69. needs: specs_checking
  70. # Don't run on private repo unless it is a PR.
  71. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  72. runs-on: macos-12
  73. env:
  74. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  75. local_repo: specstesting
  76. local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
  77. targeted_pod: FirebaseCore
  78. steps:
  79. - uses: actions/checkout@v3
  80. - uses: actions/download-artifact@v3
  81. with:
  82. name: firebase-ios-sdk
  83. path: ${{ env.local_sdk_repo_dir }}
  84. - name: Get token
  85. run: |
  86. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  87. bot-access.txt "$bot_token_secret"
  88. - name: Update SpecsTesting repo
  89. run: |
  90. botaccess=`cat bot-access.txt`
  91. cd scripts/create_spec_repo/
  92. swift build
  93. pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git
  94. BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \
  95. --sdk-repo "${local_sdk_repo_dir}" \
  96. --local-spec-repo-name "${local_repo}" \
  97. --sdk-repo-name SpecsTesting \
  98. --github-account Firebase \
  99. --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
  100. --include-pods "${targeted_pod}" --keep-repo
  101. - name: Clean Artifacts
  102. if: ${{ always() }}
  103. run: |
  104. pod repo remove "${local_repo}"
  105. rm -rf bot-access.txt
  106. buildup_SpecsTesting_repo:
  107. needs: [buildup_SpecsTesting_repo_FirebaseCore, specs_checking]
  108. # Don't run on private repo unless it is a PR.
  109. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  110. runs-on: macos-12
  111. strategy:
  112. fail-fast: false
  113. matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}}
  114. env:
  115. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  116. local_repo: specstesting
  117. local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
  118. targeted_pod: ${{ matrix.podspec }}
  119. steps:
  120. - uses: actions/checkout@v3
  121. - uses: actions/download-artifact@v3
  122. with:
  123. name: firebase-ios-sdk
  124. path: ${{ env.local_sdk_repo_dir }}
  125. - name: Get token
  126. run: |
  127. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  128. bot-access.txt "$bot_token_secret"
  129. - name: Update SpecsTesting repo
  130. run: |
  131. [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true
  132. botaccess=`cat bot-access.txt`
  133. cd scripts/create_spec_repo/
  134. swift build
  135. pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git
  136. # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the
  137. # command if ${ALLOWWARNINGS} is not null.
  138. BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \
  139. --sdk-repo "${local_sdk_repo_dir}" \
  140. --local-spec-repo-name "${local_repo}" \
  141. --sdk-repo-name SpecsTesting \
  142. --github-account Firebase \
  143. --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
  144. --include-pods "${targeted_pod}" \
  145. --keep-repo ${ALLOWWARNINGS:+--allow-warnings}
  146. - name: Clean Artifacts
  147. if: ${{ always() }}
  148. run: |
  149. pod repo remove "${local_repo}"
  150. rm -rf bot-access.txt
  151. update_SpecsTesting_repo:
  152. # Don't run on private repo unless it is a PR.
  153. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged == true
  154. runs-on: macos-12
  155. env:
  156. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  157. local_repo: specstesting
  158. local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
  159. podspec_repo_branch: master
  160. steps:
  161. - uses: actions/checkout@v3
  162. - name: Get token
  163. run: |
  164. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/oss-bot-access.txt.gpg \
  165. oss-bot-access.txt "$bot_token_secret"
  166. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  167. bot-access.txt "$bot_token_secret"
  168. - name: Update SpecsTesting repo setup
  169. run: |
  170. ossbotaccess=`cat oss-bot-access.txt`
  171. # Update/create a nightly tag to the head of the master branch.
  172. BOT_TOKEN="${ossbotaccess}" test_version="${nightly_version}" sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" local_sdk_repo_dir="${local_sdk_repo_dir}" podspec_repo_branch="${podspec_repo_branch}" scripts/release_testing_setup.sh prerelease_testing
  173. - name: Push updated podspecs
  174. run: |
  175. botaccess=`cat bot-access.txt`
  176. cd "${local_sdk_repo_dir}"
  177. # Changes in post submit tests will be fetched by getting diff between
  178. # the HEAD and HEAD^ of the master branch.
  179. common_commit=$(git rev-parse HEAD^)
  180. git diff --name-only $common_commit remotes/origin/${podspec_repo_branch} > updated_files.txt
  181. updated_podspecs=()
  182. while IFS= read -r line;
  183. do
  184. echo $line
  185. if [ ${line: -8} == ".podspec" ]
  186. then
  187. updated_podspecs+=("$(basename -s .podspec ${line})")
  188. fi
  189. done < updated_files.txt
  190. if [ -z "$updated_podspecs" ]
  191. then
  192. exit
  193. fi
  194. cd scripts/create_spec_repo/
  195. swift build
  196. pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git
  197. BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo "${local_sdk_repo_dir}" --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}"
  198. abtesting_quickstart:
  199. # Don't run on private repo unless it is a PR.
  200. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  201. needs: buildup_SpecsTesting_repo
  202. env:
  203. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  204. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  205. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  206. runs-on: macos-12
  207. steps:
  208. - uses: actions/checkout@v3
  209. - uses: ruby/setup-ruby@v1
  210. - name: Get token
  211. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  212. bot-access.txt "$bot_token_secret"
  213. - name: Setup testing repo and quickstart
  214. env:
  215. LEGACY: true
  216. run: |
  217. botaccess=`cat bot-access.txt`
  218. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh abtesting prerelease_testing
  219. - name: Install Secret GoogleService-Info.plist
  220. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  221. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  222. - name: Test swift quickstart
  223. env:
  224. LEGACY: true
  225. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  226. - name: Remove data before upload
  227. env:
  228. LEGACY: true
  229. run: scripts/remove_data.sh config release_testing
  230. - uses: actions/upload-artifact@v2
  231. if: ${{ failure() }}
  232. with:
  233. name: quickstart_artifacts_abtesting
  234. path: quickstart-ios/
  235. auth_quickstart:
  236. # Don't run on private repo unless it is a PR.
  237. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  238. needs: buildup_SpecsTesting_repo
  239. env:
  240. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  241. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  242. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  243. runs-on: macos-12
  244. steps:
  245. - uses: actions/checkout@v3
  246. - uses: ruby/setup-ruby@v1
  247. - name: Get token
  248. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  249. bot-access.txt "$bot_token_secret"
  250. - name: Setup testing repo and quickstart
  251. run: |
  252. botaccess=`cat bot-access.txt`
  253. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh Authentication prerelease_testing
  254. - name: Install Secret GoogleService-Info.plist
  255. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  256. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  257. - name: Test swift quickstart
  258. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)
  259. - name: Remove data before upload
  260. run: scripts/remove_data.sh authentication release_testing
  261. - uses: actions/upload-artifact@v2
  262. if: ${{ failure() }}
  263. with:
  264. name: quickstart_artifacts_auth
  265. path: quickstart-ios/
  266. crashlytics_quickstart:
  267. # Don't run on private repo unless it is a PR.
  268. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  269. needs: buildup_SpecsTesting_repo
  270. env:
  271. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  272. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  273. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  274. testing_repo_dir: "/tmp/test/"
  275. testing_repo: "firebase-ios-sdk"
  276. runs-on: macos-12
  277. steps:
  278. - uses: actions/checkout@v3
  279. - uses: ruby/setup-ruby@v1
  280. - name: Get token
  281. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  282. bot-access.txt "$bot_token_secret"
  283. - name: Setup testing repo and quickstart
  284. env:
  285. LEGACY: true
  286. run: |
  287. botaccess=`cat bot-access.txt`
  288. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh Crashlytics prerelease_testing
  289. - name: Install Secret GoogleService-Info.plist
  290. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  291. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  292. - name: Test objc quickstart
  293. env:
  294. LEGACY: true
  295. run: |
  296. mkdir -p quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
  297. # Set the deployed pod location of run and upload-symbols with the development pod version.
  298. cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  299. cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  300. ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true)
  301. - name: Test swift quickstart
  302. env:
  303. LEGACY: true
  304. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift)
  305. - name: Remove data before upload
  306. env:
  307. LEGACY: true
  308. run: scripts/remove_data.sh crashlytics release_testing
  309. - uses: actions/upload-artifact@v2
  310. if: ${{ failure() }}
  311. with:
  312. name: quickstart_artifacts_crashlytics
  313. path: quickstart-ios/
  314. database_quickstart:
  315. # Don't run on private repo unless it is a PR.
  316. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  317. needs: buildup_SpecsTesting_repo
  318. env:
  319. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  320. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  321. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  322. testing_repo_dir: "/tmp/test/"
  323. testing_repo: "firebase-ios-sdk"
  324. runs-on: macos-12
  325. steps:
  326. - uses: actions/checkout@v3
  327. - uses: ruby/setup-ruby@v1
  328. - name: Get token
  329. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  330. bot-access.txt "$bot_token_secret"
  331. - name: Setup testing repo and quickstart
  332. run: |
  333. botaccess=`cat bot-access.txt`
  334. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh database prerelease_testing
  335. - name: Install Secret GoogleService-Info.plist
  336. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \
  337. quickstart-ios/database/GoogleService-Info.plist "$plist_secret"
  338. - name: Test objc quickstart
  339. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false)
  340. - name: Test swift quickstart
  341. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift)
  342. - name: Remove data before upload
  343. run: scripts/remove_data.sh database release_testing
  344. - uses: actions/upload-artifact@v2
  345. if: ${{ failure() }}
  346. with:
  347. name: quickstart_artifacts_database
  348. path: quickstart-ios/
  349. dynamiclinks_quickstart:
  350. # Don't run on private repo unless it is a PR.
  351. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  352. needs: buildup_SpecsTesting_repo
  353. env:
  354. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  355. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  356. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  357. testing_repo_dir: "/tmp/test/"
  358. testing_repo: "firebase-ios-sdk"
  359. runs-on: macos-12
  360. steps:
  361. - uses: actions/checkout@v3
  362. - uses: ruby/setup-ruby@v1
  363. - name: Get token
  364. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  365. bot-access.txt "$bot_token_secret"
  366. - name: Setup testing repo and quickstart
  367. run: |
  368. botaccess=`cat bot-access.txt`
  369. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh dynamiclinks prerelease_testing
  370. - name: Install Secret GoogleService-Info.plist
  371. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  372. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  373. - name: Update Environment Variable For DynamicLinks
  374. run: |
  375. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  376. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  377. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  378. - name: Test objc quickstart
  379. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true)
  380. - name: Test swift quickstart
  381. if: ${{ always() }}
  382. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true swift)
  383. - name: Remove data before upload
  384. run: scripts/remove_data.sh dynamiclinks release_testing
  385. - uses: actions/upload-artifact@v2
  386. if: ${{ failure() }}
  387. with:
  388. name: quickstart_artifacts_dynamiclinks
  389. path: quickstart-ios/
  390. firestore_quickstart:
  391. # Don't run on private repo unless it is a PR.
  392. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  393. needs: buildup_SpecsTesting_repo
  394. env:
  395. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  396. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  397. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  398. testing_repo_dir: "/tmp/test/"
  399. testing_repo: "firebase-ios-sdk"
  400. runs-on: macos-12
  401. steps:
  402. - uses: actions/checkout@v3
  403. - uses: ruby/setup-ruby@v1
  404. - name: Get token
  405. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  406. bot-access.txt "$bot_token_secret"
  407. - name: Setup testing repo and quickstart
  408. run: |
  409. botaccess=`cat bot-access.txt`
  410. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh firestore prerelease_testing
  411. - name: Install Secret GoogleService-Info.plist
  412. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  413. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  414. - name: Test swift quickstart
  415. run: ([ -z $plist_secret ] ||
  416. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore false)
  417. - name: Remove data before upload
  418. run: scripts/remove_data.sh firestore release_testing
  419. - uses: actions/upload-artifact@v2
  420. if: ${{ failure() }}
  421. with:
  422. name: quickstart_artifacts_firestore
  423. path: quickstart-ios/
  424. functions_quickstart:
  425. # Don't run on private repo unless it is a PR.
  426. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  427. needs: buildup_SpecsTesting_repo
  428. env:
  429. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  430. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  431. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  432. testing_repo_dir: "/tmp/test/"
  433. testing_repo: "firebase-ios-sdk"
  434. LEGACY: true
  435. runs-on: macos-12
  436. steps:
  437. - uses: actions/checkout@v3
  438. - uses: ruby/setup-ruby@v1
  439. - name: Get token
  440. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  441. bot-access.txt "$bot_token_secret"
  442. - name: Setup testing repo and quickstart
  443. run: |
  444. botaccess=`cat bot-access.txt`
  445. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions prerelease_testing
  446. - name: install secret googleservice-info.plist
  447. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  448. quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  449. - name: Setup custom URL scheme
  450. run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  451. - name: Test objc quickstart
  452. run: ([ -z $plist_secret ] ||
  453. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  454. - name: Test swift quickstart
  455. run: ([ -z $plist_secret ] ||
  456. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  457. - name: Remove data before upload
  458. run: scripts/remove_data.sh functions release_testing
  459. - uses: actions/upload-artifact@v2
  460. if: ${{ failure() }}
  461. with:
  462. name: quickstart_artifacts_functions
  463. path: quickstart-ios/
  464. inappmessaging_quickstart:
  465. # Don't run on private repo unless it is a PR.
  466. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  467. needs: buildup_SpecsTesting_repo
  468. env:
  469. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  470. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  471. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  472. testing_repo_dir: "/tmp/test/"
  473. testing_repo: "firebase-ios-sdk"
  474. runs-on: macos-12
  475. steps:
  476. - uses: actions/checkout@v3
  477. - uses: ruby/setup-ruby@v1
  478. - name: Get token
  479. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  480. bot-access.txt "$bot_token_secret"
  481. - name: Setup testing repo and quickstart
  482. run: |
  483. botaccess=`cat bot-access.txt`
  484. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh inappmessaging prerelease_testing
  485. - name: install secret googleservice-info.plist
  486. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  487. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  488. - name: Test objc quickstart
  489. run: ([ -z $plist_secret ] ||
  490. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true)
  491. - name: Test swift quickstart
  492. run: ([ -z $plist_secret ] ||
  493. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift)
  494. - name: Remove data before upload
  495. run: scripts/remove_data.sh inappmessaging release_testing
  496. - uses: actions/upload-artifact@v2
  497. if: ${{ failure() }}
  498. with:
  499. name: quickstart_artifacts_inappmessaging
  500. path: quickstart-ios/
  501. messaging_quickstart:
  502. # Don't run on private repo unless it is a PR.
  503. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  504. needs: buildup_SpecsTesting_repo
  505. env:
  506. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  507. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  508. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  509. testing_repo_dir: "/tmp/test/"
  510. testing_repo: "firebase-ios-sdk"
  511. runs-on: macos-12
  512. steps:
  513. - uses: actions/checkout@v3
  514. - uses: ruby/setup-ruby@v1
  515. - name: Get token
  516. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  517. bot-access.txt "$bot_token_secret"
  518. - name: Setup testing repo and quickstart
  519. run: |
  520. botaccess=`cat bot-access.txt`
  521. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh messaging prerelease_testing
  522. - name: Install Secret GoogleService-Info.plist
  523. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  524. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  525. - name: Test objc quickstart
  526. run: ([ -z $plist_secret ] ||
  527. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
  528. - name: Test swift quickstart
  529. run: ([ -z $plist_secret ] ||
  530. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false swift)
  531. - name: Remove data before upload
  532. run: scripts/remove_data.sh messaging release_testing
  533. - uses: actions/upload-artifact@v2
  534. if: ${{ failure() }}
  535. with:
  536. name: quickstart_artifacts_messaging
  537. path: quickstart-ios/
  538. remoteconfig_quickstart:
  539. # Don't run on private repo unless it is a PR.
  540. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  541. needs: buildup_SpecsTesting_repo
  542. env:
  543. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  544. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  545. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  546. runs-on: macos-12
  547. steps:
  548. - uses: actions/checkout@v3
  549. - uses: ruby/setup-ruby@v1
  550. - name: Get token
  551. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  552. bot-access.txt "$bot_token_secret"
  553. - name: Setup testing repo and quickstart
  554. run: |
  555. botaccess=`cat bot-access.txt`
  556. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh config prerelease_testing
  557. - name: Install Secret GoogleService-Info.plist
  558. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  559. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  560. - name: Test Swift Quickstart
  561. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  562. - name: Remove data before upload
  563. run: scripts/remove_data.sh config release_testing
  564. - uses: actions/upload-artifact@v2
  565. if: ${{ failure() }}
  566. with:
  567. name: quickstart_artifacts_config
  568. path: quickstart-ios/
  569. storage_quickstart:
  570. # Don't run on private repo unless it is a PR.
  571. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  572. needs: buildup_SpecsTesting_repo
  573. env:
  574. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  575. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  576. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  577. testing_repo_dir: "/tmp/test/"
  578. testing_repo: "firebase-ios-sdk"
  579. LEGACY: true
  580. runs-on: macos-12
  581. steps:
  582. - uses: actions/checkout@v3
  583. - uses: ruby/setup-ruby@v1
  584. - name: Get token
  585. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  586. bot-access.txt "$bot_token_secret"
  587. - name: Setup testing repo and quickstart
  588. run: |
  589. botaccess=`cat bot-access.txt`
  590. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh storage prerelease_testing
  591. - name: Install Secret GoogleService-Info.plist
  592. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  593. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  594. - name: Test objc quickstart
  595. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
  596. - name: Test swift quickstart
  597. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  598. - name: Remove data before upload
  599. run: scripts/remove_data.sh storage release_testing
  600. - uses: actions/upload-artifact@v2
  601. if: ${{ failure() }}
  602. with:
  603. name: quickstart_artifacts_storage
  604. path: quickstart-ios/
  605. performance_quickstart:
  606. # Don't run on private repo unless it is a PR.
  607. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  608. needs: buildup_SpecsTesting_repo
  609. env:
  610. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  611. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  612. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  613. testing_repo_dir: "/tmp/test/"
  614. testing_repo: "firebase-ios-sdk"
  615. runs-on: macos-12
  616. steps:
  617. - uses: actions/checkout@v3
  618. - uses: ruby/setup-ruby@v1
  619. - name: Get token
  620. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
  621. bot-access.txt "$bot_token_secret"
  622. - name: Setup testing repo and quickstart
  623. run: |
  624. botaccess=`cat bot-access.txt`
  625. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh Performance prerelease_testing
  626. - name: Install Secret GoogleService-Info.plist
  627. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  628. quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  629. - name: Test objc quickstart
  630. run: |
  631. ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
  632. - name: Test swift quickstart
  633. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true swift)
  634. - name: Remove data before upload
  635. run: scripts/remove_data.sh performance release_testing
  636. - uses: actions/upload-artifact@v2
  637. if: ${{ failure() }}
  638. with:
  639. name: quickstart_artifacts_performance
  640. path: quickstart-ios/