build_analytics.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. name: Build-analytics-run
  2. on:
  3. schedule:
  4. - cron: "0 0 * * *" # At 00:00 every day
  5. workflow_dispatch:
  6. inputs:
  7. build_preset:
  8. type: choice
  9. default: "relwithdebinfo"
  10. description: "Build preset"
  11. options:
  12. - debug
  13. - release
  14. - relwithdebinfo
  15. - release-asan
  16. - release-tsan
  17. - release-msan
  18. runner_label:
  19. type: string
  20. default: "auto-provisioned"
  21. description: "runner label"
  22. commit_sha:
  23. type: string
  24. default: ""
  25. build_target:
  26. type: string
  27. default: "ydb"
  28. description: "limit build and test to specific target"
  29. jobs:
  30. main:
  31. name: Build and gather build analytics
  32. runs-on: [ self-hosted, "${{ inputs.runner_label || 'auto-provisioned' }}", "${{ format('build-preset-{0}', inputs.build_preset || 'relwithdebinfo') }}" ]
  33. steps:
  34. - name: Checkout
  35. uses: actions/checkout@v4
  36. with:
  37. ref: ${{ inputs.commit_sha }}
  38. - name: Setup ydb access
  39. uses: ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
  40. with:
  41. ci_ydb_service_account_key_file_credentials: ${{ secrets.CI_YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS }}
  42. - name: Build and test
  43. uses: ./.github/actions/build_and_test_ya
  44. with:
  45. build_preset: ${{ inputs.build_preset || 'relwithdebinfo'}}
  46. build_target: ${{ inputs.build_target || 'ydb/apps/ydbd'}}
  47. increment: false
  48. run_tests: false
  49. put_build_results_to_cache: false
  50. additional_ya_make_args: "-DDEBUGINFO_LINES_ONLY -DDUMP_LINKER_MAP -DCOMPILER_TIME_TRACE --add-result .json"
  51. secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
  52. secrets.TESTMO_TOKEN2, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
  53. vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
  54. vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}
  55. - name: Gather and send build analytics
  56. uses: ./.github/actions/build_analytics
  57. with:
  58. build_preset: ${{ inputs.build_preset || 'relwithdebinfo'}}
  59. build_target: ${{ inputs.build_target || 'ydb/apps/ydbd'}}
  60. secs: ${{ format('{{"TESTMO_TOKEN":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
  61. secrets.TESTMO_TOKEN2, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
  62. vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
  63. vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}