pipeline-electron-build-and-test.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. name: Electron Build & Test Pipeline
  2. on:
  3. workflow_call:
  4. inputs:
  5. target-platform:
  6. type: string
  7. description: 'Platform to run on, can be macos, win or linux'
  8. required: true
  9. target-arch:
  10. type: string
  11. description: 'Arch to build for, can be x64, arm64 or arm'
  12. required: true
  13. build-runs-on:
  14. type: string
  15. description: 'What host to run the build'
  16. required: true
  17. test-runs-on:
  18. type: string
  19. description: 'What host to run the tests on'
  20. required: true
  21. build-container:
  22. type: string
  23. description: 'JSON container information for aks runs-on'
  24. required: false
  25. default: '{"image":null}'
  26. test-container:
  27. type: string
  28. description: 'JSON container information for testing'
  29. required: false
  30. default: '{"image":null}'
  31. is-release:
  32. description: 'Whether this build job is a release job'
  33. required: true
  34. type: boolean
  35. default: false
  36. gn-build-type:
  37. description: 'The gn build type - testing or release'
  38. required: true
  39. type: string
  40. default: testing
  41. generate-symbols:
  42. description: 'Whether or not to generate symbols'
  43. required: true
  44. type: boolean
  45. default: false
  46. upload-to-storage:
  47. description: 'Whether or not to upload build artifacts to external storage'
  48. required: true
  49. type: string
  50. default: '0'
  51. is-asan:
  52. description: 'Building the Address Sanitizer (ASan) Linux build'
  53. required: false
  54. type: boolean
  55. default: false
  56. concurrency:
  57. group: electron-build-and-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
  58. cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
  59. permissions:
  60. contents: read
  61. issues: read
  62. pull-requests: read
  63. jobs:
  64. build:
  65. uses: ./.github/workflows/pipeline-segment-electron-build.yml
  66. with:
  67. build-runs-on: ${{ inputs.build-runs-on }}
  68. build-container: ${{ inputs.build-container }}
  69. target-platform: ${{ inputs.target-platform }}
  70. target-arch: ${{ inputs.target-arch }}
  71. is-release: ${{ inputs.is-release }}
  72. gn-build-type: ${{ inputs.gn-build-type }}
  73. generate-symbols: ${{ inputs.generate-symbols }}
  74. upload-to-storage: ${{ inputs.upload-to-storage }}
  75. is-asan: ${{ inputs.is-asan}}
  76. secrets: inherit
  77. test:
  78. uses: ./.github/workflows/pipeline-segment-electron-test.yml
  79. needs: build
  80. with:
  81. target-arch: ${{ inputs.target-arch }}
  82. target-platform: ${{ inputs.target-platform }}
  83. test-runs-on: ${{ inputs.test-runs-on }}
  84. test-container: ${{ inputs.test-container }}
  85. is-asan: ${{ inputs.is-asan}}
  86. secrets: inherit