prerelease.yml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  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. env:
  11. FIREBASE_CI: true
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. specs_checking:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  19. runs-on: macos-14
  20. env:
  21. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  22. local_repo: specstesting
  23. podspec_repo_branch: main
  24. outputs:
  25. matrix: ${{ steps.generate_matrix.outputs.matrix }}
  26. steps:
  27. - name: Checkout code
  28. uses: actions/checkout@v4
  29. with:
  30. fetch-depth: 0
  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. podspec_repo_branch="${podspec_repo_branch}" \
  40. scripts/release_testing_setup.sh prerelease_testing
  41. env:
  42. BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  43. - name: Get token
  44. run: |
  45. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  46. prerelease-testing-token.txt "$bot_token_secret"
  47. - name: Clean spec repo
  48. run: |
  49. ossbotaccess=`cat prerelease-testing-token.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 prerelease-testing-token.txt
  62. - uses: actions/upload-artifact@v4
  63. with:
  64. name: firebase-ios-sdk
  65. path: |
  66. *.podspec
  67. *.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-14
  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@v4
  80. - uses: actions/download-artifact@v4.1.7
  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/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 "${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-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.1.7
  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. podspec_repo_branch: main
  159. steps:
  160. - uses: actions/checkout@v4
  161. with:
  162. fetch-depth: 0
  163. - name: Get token
  164. run: |
  165. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  166. bot-access.txt "$bot_token_secret"
  167. - name: Update SpecsTesting repo setup
  168. run: |
  169. # Update/create a nightly tag to the head of the main branch.
  170. podspec_repo_branch="${podspec_repo_branch}" \
  171. scripts/release_testing_setup.sh prerelease_testing
  172. env:
  173. BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  174. - name: Push updated podspecs
  175. run: |
  176. botaccess=`cat bot-access.txt`
  177. # Changes in post submit tests will be fetched by getting diff between
  178. # the HEAD and HEAD^ of the main 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 $(pwd) --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-14
  207. steps:
  208. - uses: actions/checkout@v4
  209. - uses: ruby/setup-ruby@v1
  210. - name: Get token
  211. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.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. if: ${{ failure() }}
  230. run: scripts/remove_data.sh config
  231. - uses: actions/upload-artifact@v4
  232. if: ${{ failure() }}
  233. with:
  234. name: quickstart_artifacts_abtesting
  235. path: quickstart-ios/
  236. auth_quickstart:
  237. # Don't run on private repo unless it is a PR.
  238. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  239. needs: buildup_SpecsTesting_repo
  240. env:
  241. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  242. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  243. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  244. runs-on: macos-15
  245. steps:
  246. - uses: actions/checkout@v4
  247. - uses: ruby/setup-ruby@v1
  248. - name: Get token
  249. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  250. bot-access.txt "$bot_token_secret"
  251. - name: Xcode
  252. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  253. - name: Setup testing repo and quickstart
  254. run: |
  255. botaccess=`cat bot-access.txt`
  256. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh Authentication prerelease_testing
  257. - name: Install Secret GoogleService-Info.plist
  258. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  259. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  260. - name: Test swift quickstart
  261. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)
  262. - name: Remove data before upload
  263. if: ${{ failure() }}
  264. run: scripts/remove_data.sh authentication
  265. - uses: actions/upload-artifact@v4
  266. if: ${{ failure() }}
  267. with:
  268. name: quickstart_artifacts_auth
  269. path: quickstart-ios/
  270. crashlytics_quickstart:
  271. # Don't run on private repo unless it is a PR.
  272. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  273. needs: buildup_SpecsTesting_repo
  274. env:
  275. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  276. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  277. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  278. testing_repo_dir: "/tmp/test/"
  279. testing_repo: "firebase-ios-sdk"
  280. runs-on: macos-14
  281. steps:
  282. - uses: actions/checkout@v4
  283. - uses: ruby/setup-ruby@v1
  284. - name: Get token
  285. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  286. bot-access.txt "$bot_token_secret"
  287. - name: Setup testing repo and quickstart
  288. env:
  289. LEGACY: true
  290. run: |
  291. botaccess=`cat bot-access.txt`
  292. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh Crashlytics prerelease_testing
  293. - name: Install Secret GoogleService-Info.plist
  294. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  295. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  296. - name: Test swift quickstart
  297. env:
  298. LEGACY: true
  299. run: |
  300. mkdir -p quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
  301. # Set the deployed pod location of run and upload-symbols with the development pod version.
  302. cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  303. cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  304. ([ -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. if: ${{ failure() }}
  309. run: scripts/remove_data.sh crashlytics
  310. - uses: actions/upload-artifact@v4
  311. if: ${{ failure() }}
  312. with:
  313. name: quickstart_artifacts_crashlytics
  314. path: quickstart-ios/
  315. database_quickstart:
  316. # Don't run on private repo unless it is a PR.
  317. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  318. needs: buildup_SpecsTesting_repo
  319. env:
  320. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  321. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  322. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  323. testing_repo_dir: "/tmp/test/"
  324. testing_repo: "firebase-ios-sdk"
  325. runs-on: macos-14
  326. steps:
  327. - uses: actions/checkout@v4
  328. - uses: ruby/setup-ruby@v1
  329. - name: Get token
  330. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  331. bot-access.txt "$bot_token_secret"
  332. - name: Setup testing repo and quickstart
  333. run: |
  334. botaccess=`cat bot-access.txt`
  335. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh database prerelease_testing
  336. - name: Install Secret GoogleService-Info.plist
  337. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \
  338. quickstart-ios/database/GoogleService-Info.plist "$plist_secret"
  339. - name: Test objc quickstart
  340. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false)
  341. - name: Test swift quickstart
  342. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift)
  343. - name: Remove data before upload
  344. if: ${{ failure() }}
  345. run: scripts/remove_data.sh database
  346. - uses: actions/upload-artifact@v4
  347. if: ${{ failure() }}
  348. with:
  349. name: quickstart_artifacts_database
  350. path: quickstart-ios/
  351. dynamiclinks_quickstart:
  352. # Don't run on private repo unless it is a PR.
  353. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  354. needs: buildup_SpecsTesting_repo
  355. env:
  356. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  357. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  358. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  359. testing_repo_dir: "/tmp/test/"
  360. testing_repo: "firebase-ios-sdk"
  361. runs-on: macos-14
  362. steps:
  363. - uses: actions/checkout@v4
  364. - uses: ruby/setup-ruby@v1
  365. - name: Get token
  366. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  367. bot-access.txt "$bot_token_secret"
  368. - name: Setup testing repo and quickstart
  369. run: |
  370. botaccess=`cat bot-access.txt`
  371. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh dynamiclinks prerelease_testing
  372. - name: Install Secret GoogleService-Info.plist
  373. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \
  374. quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret"
  375. - name: Update Environment Variable For DynamicLinks
  376. run: |
  377. sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
  378. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m
  379. sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift
  380. - name: Test objc quickstart
  381. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true)
  382. - name: Test swift quickstart
  383. if: ${{ always() }}
  384. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh DynamicLinks true swift)
  385. - name: Remove data before upload
  386. if: ${{ failure() }}
  387. run: scripts/remove_data.sh dynamiclinks
  388. - uses: actions/upload-artifact@v4
  389. if: ${{ failure() }}
  390. with:
  391. name: quickstart_artifacts_dynamiclinks
  392. path: quickstart-ios/
  393. firestore_quickstart:
  394. # Don't run on private repo unless it is a PR.
  395. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  396. needs: buildup_SpecsTesting_repo
  397. env:
  398. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  399. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  400. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  401. testing_repo_dir: "/tmp/test/"
  402. testing_repo: "firebase-ios-sdk"
  403. runs-on: macos-14
  404. steps:
  405. - uses: actions/checkout@v4
  406. - uses: ruby/setup-ruby@v1
  407. - name: Get token
  408. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  409. bot-access.txt "$bot_token_secret"
  410. - name: Setup testing repo and quickstart
  411. run: |
  412. botaccess=`cat bot-access.txt`
  413. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh firestore prerelease_testing
  414. - name: Install Secret GoogleService-Info.plist
  415. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  416. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  417. - name: Test swift quickstart
  418. run: ([ -z $plist_secret ] ||
  419. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore false)
  420. - name: Remove data before upload
  421. if: ${{ failure() }}
  422. run: scripts/remove_data.sh firestore
  423. - uses: actions/upload-artifact@v4
  424. if: ${{ failure() }}
  425. with:
  426. name: quickstart_artifacts_firestore
  427. path: quickstart-ios/
  428. # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
  429. #functions_quickstart:
  430. # Don't run on private repo unless it is a PR.
  431. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  432. # needs: buildup_SpecsTesting_repo
  433. # env:
  434. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  435. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  436. # bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  437. # testing_repo_dir: "/tmp/test/"
  438. # testing_repo: "firebase-ios-sdk"
  439. # LEGACY: true
  440. # # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
  441. # runs-on: macos-12
  442. # steps:
  443. # - uses: actions/checkout@v4
  444. # - uses: ruby/setup-ruby@v1
  445. # - name: Get token
  446. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  447. # bot-access.txt "$bot_token_secret"
  448. # - name: Setup testing repo and quickstart
  449. # run: |
  450. # botaccess=`cat bot-access.txt`
  451. # BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions prerelease_testing
  452. # - name: install secret googleservice-info.plist
  453. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  454. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  455. # - name: Setup custom URL scheme
  456. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  457. # - name: Test objc quickstart
  458. # run: ([ -z $plist_secret ] ||
  459. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  460. # - name: Test swift quickstart
  461. # run: ([ -z $plist_secret ] ||
  462. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  463. # - name: Remove data before upload
  464. # if: ${{ failure() }}
  465. # run: scripts/remove_data.sh functions
  466. # - uses: actions/upload-artifact@v4
  467. # if: ${{ failure() }}
  468. # with:
  469. # name: quickstart_artifacts_functions
  470. # path: quickstart-ios/
  471. inappmessaging_quickstart:
  472. # Don't run on private repo unless it is a PR.
  473. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  474. needs: buildup_SpecsTesting_repo
  475. env:
  476. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  477. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  478. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  479. testing_repo_dir: "/tmp/test/"
  480. testing_repo: "firebase-ios-sdk"
  481. runs-on: macos-14
  482. steps:
  483. - uses: actions/checkout@v4
  484. - uses: ruby/setup-ruby@v1
  485. - name: Get token
  486. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  487. bot-access.txt "$bot_token_secret"
  488. - name: Setup testing repo and quickstart
  489. run: |
  490. botaccess=`cat bot-access.txt`
  491. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh inappmessaging prerelease_testing
  492. - name: install secret googleservice-info.plist
  493. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  494. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  495. - name: Test objc quickstart
  496. run: ([ -z $plist_secret ] ||
  497. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true)
  498. - name: Test swift quickstart
  499. run: ([ -z $plist_secret ] ||
  500. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift)
  501. - name: Remove data before upload
  502. if: ${{ failure() }}
  503. run: scripts/remove_data.sh inappmessaging
  504. - uses: actions/upload-artifact@v4
  505. if: ${{ failure() }}
  506. with:
  507. name: quickstart_artifacts_inappmessaging
  508. path: quickstart-ios/
  509. messaging_quickstart:
  510. # Don't run on private repo unless it is a PR.
  511. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  512. needs: buildup_SpecsTesting_repo
  513. env:
  514. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  515. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  516. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  517. testing_repo_dir: "/tmp/test/"
  518. testing_repo: "firebase-ios-sdk"
  519. runs-on: macos-14
  520. steps:
  521. - uses: actions/checkout@v4
  522. - uses: ruby/setup-ruby@v1
  523. - name: Get token
  524. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  525. bot-access.txt "$bot_token_secret"
  526. - name: Setup testing repo and quickstart
  527. run: |
  528. botaccess=`cat bot-access.txt`
  529. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh messaging prerelease_testing
  530. - name: Install Secret GoogleService-Info.plist
  531. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  532. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  533. - name: Test objc quickstart
  534. run: ([ -z $plist_secret ] ||
  535. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
  536. - name: Test swift quickstart
  537. run: ([ -z $plist_secret ] ||
  538. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false swift)
  539. - name: Remove data before upload
  540. if: ${{ failure() }}
  541. run: scripts/remove_data.sh messaging
  542. - uses: actions/upload-artifact@v4
  543. if: ${{ failure() }}
  544. with:
  545. name: quickstart_artifacts_messaging
  546. path: quickstart-ios/
  547. remoteconfig_quickstart:
  548. # Don't run on private repo unless it is a PR.
  549. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  550. needs: buildup_SpecsTesting_repo
  551. env:
  552. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  553. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  554. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  555. runs-on: macos-14
  556. steps:
  557. - uses: actions/checkout@v4
  558. - uses: ruby/setup-ruby@v1
  559. - name: Get token
  560. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  561. bot-access.txt "$bot_token_secret"
  562. - name: Setup testing repo and quickstart
  563. run: |
  564. botaccess=`cat bot-access.txt`
  565. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh config prerelease_testing
  566. - name: Install Secret GoogleService-Info.plist
  567. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  568. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  569. - name: Test Swift Quickstart
  570. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  571. - name: Remove data before upload
  572. if: ${{ failure() }}
  573. run: scripts/remove_data.sh config
  574. - uses: actions/upload-artifact@v4
  575. if: ${{ failure() }}
  576. with:
  577. name: quickstart_artifacts_config
  578. path: quickstart-ios/
  579. storage_quickstart:
  580. # Don't run on private repo unless it is a PR.
  581. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  582. needs: buildup_SpecsTesting_repo
  583. env:
  584. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  585. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  586. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  587. testing_repo_dir: "/tmp/test/"
  588. testing_repo: "firebase-ios-sdk"
  589. LEGACY: true
  590. runs-on: macos-14
  591. steps:
  592. - uses: actions/checkout@v4
  593. - uses: ruby/setup-ruby@v1
  594. - name: Get token
  595. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  596. bot-access.txt "$bot_token_secret"
  597. - name: Setup testing repo and quickstart
  598. run: |
  599. botaccess=`cat bot-access.txt`
  600. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh storage prerelease_testing
  601. - name: Install Secret GoogleService-Info.plist
  602. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
  603. quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
  604. - name: Test swift quickstart
  605. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
  606. - name: Remove data before upload
  607. if: ${{ failure() }}
  608. run: scripts/remove_data.sh storage
  609. - uses: actions/upload-artifact@v4
  610. if: ${{ failure() }}
  611. with:
  612. name: quickstart_artifacts_storage
  613. path: quickstart-ios/
  614. performance_quickstart:
  615. # Don't run on private repo unless it is a PR.
  616. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  617. needs: buildup_SpecsTesting_repo
  618. env:
  619. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  620. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  621. bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  622. testing_repo_dir: "/tmp/test/"
  623. testing_repo: "firebase-ios-sdk"
  624. runs-on: macos-14
  625. steps:
  626. - uses: actions/checkout@v4
  627. - uses: ruby/setup-ruby@v1
  628. - name: Get token
  629. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/prerelease-testing-token.txt.gpg \
  630. bot-access.txt "$bot_token_secret"
  631. - name: Setup testing repo and quickstart
  632. run: |
  633. botaccess=`cat bot-access.txt`
  634. BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh Performance prerelease_testing
  635. - name: Install Secret GoogleService-Info.plist
  636. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  637. quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  638. - name: Test swift quickstart
  639. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true swift)
  640. - name: Remove data before upload
  641. if: ${{ failure() }}
  642. run: scripts/remove_data.sh performance
  643. - uses: actions/upload-artifact@v4
  644. if: ${{ failure() }}
  645. with:
  646. name: quickstart_artifacts_performance
  647. path: quickstart-ios/