prerelease.yml 31 KB

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