prerelease.yml 31 KB

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