build_and_test_provisioned.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. name: Build-and-Test-Provisioned
  2. on:
  3. workflow_call:
  4. inputs:
  5. runner_label:
  6. required: true
  7. type: string
  8. run_build:
  9. type: boolean
  10. default: true
  11. sanitizer:
  12. required: false
  13. type: string
  14. run_unit_tests:
  15. type: boolean
  16. default: true
  17. run_functional_tests:
  18. type: boolean
  19. default: true
  20. test_label_regexp:
  21. required: false
  22. type: string
  23. extra_compile_flags:
  24. required: false
  25. type: string
  26. checkout_ref:
  27. required: false
  28. type: string
  29. ninja_target:
  30. required: false
  31. type: string
  32. workflow_dispatch:
  33. inputs:
  34. runner_label:
  35. required: true
  36. type: string
  37. run_build:
  38. type: boolean
  39. default: true
  40. sanitizer:
  41. required: false
  42. type: string
  43. run_unit_tests:
  44. type: boolean
  45. default: true
  46. run_functional_tests:
  47. type: boolean
  48. default: true
  49. test_label_regexp:
  50. required: false
  51. type: string
  52. extra_compile_flags:
  53. required: false
  54. type: string
  55. checkout_ref:
  56. required: false
  57. type: string
  58. ninja_target:
  59. required: false
  60. type: string
  61. jobs:
  62. main:
  63. name: Build and test
  64. runs-on: [ self-hosted, "${{ inputs.runner_label }}" ]
  65. steps:
  66. - name: Checkout
  67. uses: actions/checkout@v3
  68. with:
  69. ref: ${{ inputs.checkout_ref }}
  70. - name: Build
  71. uses: ./.github/actions/build
  72. if: inputs.run_build
  73. with:
  74. sanitizer: ${{ inputs.sanitizer }}
  75. ccache_remote_path: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}}
  76. extra_compile_flags: ${{ inputs.extra_compile_flags }}
  77. ninja_target: ${{ inputs.ninja_target }}
  78. - name: Run tests
  79. uses: ./.github/actions/test
  80. with:
  81. log_suffix: ${{ inputs.sanitizer != '' && format('{0}-{1}', inputs.runner_label, inputs.sanitizer) || inputs.runner_label }}
  82. test_label_regexp: ${{ inputs.test_label_regexp }}
  83. aws_key_id: ${{secrets.AWS_KEY_ID}}
  84. aws_key_value: ${{secrets.AWS_KEY_VALUE}}
  85. aws_bucket: ${{vars.AWS_BUCKET}}
  86. aws_endpoint: ${{vars.AWS_ENDPOINT}}
  87. testman_token: ${{secrets.TESTMO_TOKEN}}
  88. testman_url: ${{vars.TESTMO_URL}}
  89. testman_project_id: ${{vars.TESTMO_PROJECT_ID}}
  90. run_unit_tests: ${{inputs.run_unit_tests}}
  91. run_functional_tests: ${{inputs.run_functional_tests}}