build_and_test_ya.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Ya-Build-and-Test
  2. on:
  3. workflow_call:
  4. inputs:
  5. build_target:
  6. type: string
  7. default: "ydb/"
  8. description: "limit build and test to specific target"
  9. build_preset:
  10. type: string
  11. runner_label:
  12. type: string
  13. default: "linux"
  14. description: "runner label"
  15. runner_additional_label:
  16. type: string
  17. default: "linux"
  18. description: "additional runner label, can be empty"
  19. run_build:
  20. type: boolean
  21. default: true
  22. description: "run build"
  23. run_tests:
  24. type: boolean
  25. default: true
  26. description: "run tests"
  27. test_threads:
  28. type: string
  29. default: 56
  30. description: "Test threads count"
  31. link_threads:
  32. type: string
  33. default: 12
  34. description: "link threads count"
  35. test_size:
  36. type: string
  37. default: "small,medium,large"
  38. test_type:
  39. type: string
  40. default: ""
  41. folder_prefix:
  42. type: string
  43. default: "ya-"
  44. cache_tests:
  45. type: boolean
  46. default: false
  47. description: "Use cache for tests"
  48. put_build_results_to_cache:
  49. type: boolean
  50. default: true
  51. commit_sha:
  52. type: string
  53. default: ""
  54. defaults:
  55. run:
  56. shell: bash
  57. jobs:
  58. main:
  59. name: Build and test ${{ inputs.build_preset }}
  60. runs-on: [ self-hosted, "${{ inputs.runner_label }}", "${{ inputs.runner_additional_label || inputs.runner_label }}"]
  61. steps:
  62. - name: Checkout
  63. uses: actions/checkout@v3
  64. with:
  65. ref: ${{ inputs.commit_sha }}
  66. - name: Build and test
  67. uses: ./.github/actions/build_and_test_ya
  68. with:
  69. build_preset: ${{ inputs.build_preset }}
  70. build_target: ${{ inputs.build_target }}
  71. increment: false
  72. run_tests: ${{ inputs.run_tests }}
  73. test_size: ${{ inputs.test_size }}
  74. test_type: ${{ inputs.test_type }}
  75. test_threads: ${{ inputs.test_threads }}
  76. put_build_results_to_cache: ${{ inputs.put_build_results_to_cache }}
  77. secs: ${{ format('{{"TESTMO_TOKEN":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
  78. secrets.TESTMO_TOKEN, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
  79. vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
  80. vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}