common_quickstart_framework.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 2024 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: common_quickstart_framework
  15. permissions:
  16. contents: read
  17. on:
  18. workflow_call:
  19. inputs:
  20. product:
  21. required: true
  22. type: string
  23. zip_run_id:
  24. required: true
  25. type: string
  26. artifact_name:
  27. required: true
  28. type: string
  29. setup_command:
  30. required: true
  31. type: string
  32. plist_src_path:
  33. required: true
  34. type: string
  35. plist_dst_path:
  36. required: true
  37. type: string
  38. os:
  39. required: false
  40. type: string
  41. default: macos-15
  42. xcode:
  43. required: false
  44. type: string
  45. default: Xcode_16.4
  46. secrets:
  47. plist_secret:
  48. required: true
  49. github_token:
  50. required: true
  51. jobs:
  52. quickstart_framework:
  53. if: ${{ !cancelled() }}
  54. env:
  55. plist_secret: ${{ secrets.plist_secret }}
  56. SDK: ${{ inputs.product }}
  57. runs-on: ${{ inputs.os }}
  58. steps:
  59. - uses: actions/checkout@v4
  60. - name: Get framework dir
  61. uses: actions/download-artifact@v4.1.7
  62. with:
  63. name: ${{ inputs.artifact_name }}
  64. run-id: ${{ inputs.zip_run_id }}
  65. github-token: ${{ secrets.github_token }}
  66. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  67. - name: Xcode
  68. run: sudo xcode-select -s /Applications/${{ inputs.xcode }}.app/Contents/Developer
  69. - name: Setup Bundler
  70. run: ./scripts/setup_bundler.sh
  71. - name: Move frameworks
  72. run: |
  73. mkdir -p "${HOME}"/ios_frameworks/
  74. find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
  75. - name: Setup quickstart
  76. run: ${{ inputs.setup_command }}
  77. - name: Install Secret GoogleService-Info.plist
  78. run: scripts/decrypt_gha_secret.sh ${{ inputs.plist_src_path }} \
  79. ${{ inputs.plist_dst_path }} "$plist_secret"
  80. - name: Test Quickstart
  81. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  82. - uses: actions/upload-artifact@v4
  83. if: failure()
  84. with:
  85. name: quickstart_artifacts_${{ inputs.product }}_${{ inputs.artifact_name }}
  86. path: |
  87. quickstart-ios/
  88. !quickstart-ios/**/GoogleService-Info.plist