12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- name: Ya-Build-and-Test
- on:
- workflow_call:
- inputs:
- build_target:
- type: string
- default: "ydb/"
- description: "limit build and test to specific target"
- build_preset:
- type: string
- runner_label:
- type: string
- default: "linux"
- description: "runner label"
- runner_additional_label:
- type: string
- default: "linux"
- description: "additional runner label, can be empty"
- run_build:
- type: boolean
- default: true
- description: "run build"
- run_tests:
- type: boolean
- default: true
- description: "run tests"
- test_threads:
- type: string
- default: 56
- description: "Test threads count"
- link_threads:
- type: string
- default: 12
- description: "link threads count"
- test_size:
- type: string
- default: "small,medium,large"
- test_type:
- type: string
- default: ""
- folder_prefix:
- type: string
- default: "ya-"
- cache_tests:
- type: boolean
- default: false
- description: "Use cache for tests"
- put_build_results_to_cache:
- type: boolean
- default: true
- commit_sha:
- type: string
- default: ""
- defaults:
- run:
- shell: bash
- jobs:
- main:
- name: Build and test ${{ inputs.build_preset }}
- runs-on: [ self-hosted, "${{ inputs.runner_label }}", "${{ inputs.runner_additional_label || inputs.runner_label }}"]
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- with:
- ref: ${{ inputs.commit_sha }}
- - name: Build and test
- uses: ./.github/actions/build_and_test_ya
- with:
- build_preset: ${{ inputs.build_preset }}
- build_target: ${{ inputs.build_target }}
- increment: false
- run_tests: ${{ inputs.run_tests }}
- test_size: ${{ inputs.test_size }}
- test_type: ${{ inputs.test_type }}
- test_threads: ${{ inputs.test_threads }}
- put_build_results_to_cache: ${{ inputs.put_build_results_to_cache }}
- secs: ${{ format('{{"TESTMO_TOKEN":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
- secrets.TESTMO_TOKEN, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
- vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
- vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}
|