prerelease.yml 30 KB

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