pipeline-electron-build-and-test-and-nan.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. name: Electron Build & Test (+ Node + NaN) 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-and-nan-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
  62. cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
  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. secrets: inherit
  76. gn-check:
  77. uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
  78. with:
  79. target-platform: ${{ inputs.target-platform }}
  80. target-arch: ${{ inputs.target-arch }}
  81. check-runs-on: ${{ inputs.check-runs-on }}
  82. check-container: ${{ inputs.build-container }}
  83. gn-build-type: ${{ inputs.gn-build-type }}
  84. is-asan: ${{ inputs.is-asan }}
  85. secrets: inherit
  86. test:
  87. uses: ./.github/workflows/pipeline-segment-electron-test.yml
  88. needs: build
  89. with:
  90. target-arch: ${{ inputs.target-arch }}
  91. target-platform: ${{ inputs.target-platform }}
  92. test-runs-on: ${{ inputs.test-runs-on }}
  93. test-container: ${{ inputs.test-container }}
  94. secrets: inherit
  95. nn-test:
  96. uses: ./.github/workflows/pipeline-segment-node-nan-test.yml
  97. needs: build
  98. with:
  99. target-arch: ${{ inputs.target-arch }}
  100. target-platform: ${{ inputs.target-platform }}
  101. test-runs-on: ${{ inputs.test-runs-on }}
  102. test-container: ${{ inputs.test-container }}
  103. gn-build-type: ${{ inputs.gn-build-type }}
  104. secrets: inherit