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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 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. check-runs-on:
  18. type: string
  19. description: 'What host to run the gn-check'
  20. required: true
  21. test-runs-on:
  22. type: string
  23. description: 'What host to run the tests on'
  24. required: true
  25. build-container:
  26. type: string
  27. description: 'JSON container information for aks runs-on'
  28. required: false
  29. default: '{"image":null}'
  30. test-container:
  31. type: string
  32. description: 'JSON container information for testing'
  33. required: false
  34. default: '{"image":null}'
  35. is-release:
  36. description: 'Whether this build job is a release job'
  37. required: true
  38. type: boolean
  39. default: false
  40. gn-build-type:
  41. description: 'The gn build type - testing or release'
  42. required: true
  43. type: string
  44. default: testing
  45. generate-symbols:
  46. description: 'Whether or not to generate symbols'
  47. required: true
  48. type: boolean
  49. default: false
  50. upload-to-storage:
  51. description: 'Whether or not to upload build artifacts to external storage'
  52. required: true
  53. type: string
  54. default: '0'
  55. is-asan:
  56. description: 'Building the Address Sanitizer (ASan) Linux build'
  57. required: false
  58. type: boolean
  59. default: false
  60. concurrency:
  61. group: electron-build-and-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
  62. cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
  63. permissions:
  64. contents: read
  65. issues: read
  66. pull-requests: read
  67. jobs:
  68. build:
  69. uses: ./.github/workflows/pipeline-segment-electron-build.yml
  70. with:
  71. build-runs-on: ${{ inputs.build-runs-on }}
  72. build-container: ${{ inputs.build-container }}
  73. target-platform: ${{ inputs.target-platform }}
  74. target-arch: ${{ inputs.target-arch }}
  75. is-release: ${{ inputs.is-release }}
  76. gn-build-type: ${{ inputs.gn-build-type }}
  77. generate-symbols: ${{ inputs.generate-symbols }}
  78. upload-to-storage: ${{ inputs.upload-to-storage }}
  79. is-asan: ${{ inputs.is-asan}}
  80. secrets: inherit
  81. gn-check:
  82. uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
  83. with:
  84. target-platform: ${{ inputs.target-platform }}
  85. target-arch: ${{ inputs.target-arch }}
  86. check-runs-on: ${{ inputs.check-runs-on }}
  87. check-container: ${{ inputs.build-container }}
  88. gn-build-type: ${{ inputs.gn-build-type }}
  89. is-asan: ${{ inputs.is-asan }}
  90. secrets: inherit
  91. test:
  92. uses: ./.github/workflows/pipeline-segment-electron-test.yml
  93. needs: build
  94. with:
  95. target-arch: ${{ inputs.target-arch }}
  96. target-platform: ${{ inputs.target-platform }}
  97. test-runs-on: ${{ inputs.test-runs-on }}
  98. test-container: ${{ inputs.test-container }}
  99. is-asan: ${{ inputs.is-asan}}
  100. secrets: inherit