Skip to content

Build-analytics-run

Build-analytics-run #7

name: Build-analytics-run
on:
schedule:
- cron: "0 0 * * *" # At 00:00 every day
workflow_dispatch:
inputs:
build_preset:
type: choice
default: "relwithdebinfo"
description: "Build preset"
options:
- debug
- release
- relwithdebinfo
- release-asan
- release-tsan
- release-msan
runner_label:
type: string
default: "auto-provisioned"
description: "runner label"
commit_sha:
type: string
default: ""
build_target:
type: string
default: "ydb"
description: "limit build and test to specific target"
jobs:
main:
name: Build and gather build analytics
runs-on: [ self-hosted, "${{ inputs.runner_label || 'auto-provisioned' }}", "${{ format('build-preset-{0}', inputs.build_preset || 'relwithdebinfo') }}" ]
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ inputs.commit_sha }}
- name: Setup ydb access
uses: ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
with:
ci_ydb_service_account_key_file_credentials: ${{ secrets.CI_YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS }}
ydb_qa_config: ${{ vars.YDB_QA_CONFIG }}
- name: Build and test
uses: ./.github/actions/build_and_test_ya
with:
build_preset: ${{ inputs.build_preset || 'relwithdebinfo'}}
build_target: ${{ inputs.build_target || 'ydb/apps/ydbd'}}
increment: false
run_tests: false
put_build_results_to_cache: false
additional_ya_make_args: "-DDEBUGINFO_LINES_ONLY -DDUMP_LINKER_MAP -DCOMPILER_TIME_TRACE --add-result .json"
secs: ${{ format('{{"AWS_KEY_ID":"{0}","AWS_KEY_VALUE":"{1}","REMOTE_CACHE_USERNAME":"{2}","REMOTE_CACHE_PASSWORD":"{3}","YDBOT_TELEGRAM_BOT_TOKEN":"{4}"}}',
secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD, secrets.YDBOT_TELEGRAM_BOT_TOKEN ) }}
vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","GH_ALERTS_TG_LOGINS":"{3}","GH_ALERTS_TG_CHAT":"{4}"}}',
vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.GH_ALERTS_TG_LOGINS, vars.GH_ALERTS_TG_CHAT ) }}
- name: Gather and send build analytics
uses: ./.github/actions/build_analytics
with:
build_preset: ${{ inputs.build_preset || 'relwithdebinfo'}}
build_target: ${{ inputs.build_target || 'ydb/apps/ydbd'}}
secs: ${{ format('{{"AWS_KEY_ID":"{0}","AWS_KEY_VALUE":"{1}","REMOTE_CACHE_USERNAME":"{2}","REMOTE_CACHE_PASSWORD":"{3}"}}',
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}"}}',
vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA ) }}