Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge ydbd binaries upload into stable-24-3 for testing purposes #9710

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/actions/s3cmd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ inputs:
required: true
description: "s3 key secret"
s3_bucket:
required: true
required: false
description: "s3 bucket"
s3_endpoint:
required: true
description: "s3 endpoint"
folder_prefix:
required: true
required: false
description: "folder prefix"
build_preset:
required: true
required: false
description: "build preset like relwithdebinfo"
runs:
using: "composite"
Expand All @@ -35,7 +35,14 @@ runs:
host_base = storage.yandexcloud.net
host_bucket = %(bucket)s.storage.yandexcloud.net
EOF

env:
s3_key_id: ${{ inputs.s3_key_id }}
s3_secret_access_key: ${{ inputs.s3_key_secret }}

- name: export s3 path variables
shell: bash
if: inputs.build_preset
run: |
folder="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"

BUILD_PRESET="${{ inputs.build_preset }}"
Expand All @@ -57,7 +64,4 @@ runs:
echo "S3_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
echo "S3_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
echo "S3_TEST_ARTIFACTS_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/testing_out_stuff/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
echo "S3_TEST_ARTIFACTS_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/testing_out_stuff/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
env:
s3_key_id: ${{ inputs.s3_key_id }}
s3_secret_access_key: ${{ inputs.s3_key_secret }}
echo "S3_TEST_ARTIFACTS_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/testing_out_stuff/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
54 changes: 54 additions & 0 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Nightly-Build # workflow used to upload built binaries to s3
on:
workflow_dispatch:
inputs:
runner_label:
type: string
default: "auto-provisioned"
description: "runner label"
commit_sha:
type: string
default: ""
jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
build_preset: ["relwithdebinfo", "release-asan"]
runs-on: [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', matrix.build_preset) }}" ]
name: Build and test ${{ matrix.build_preset }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit_sha }}
fetch-depth: 2
- 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 }}
- name: Build and test
uses: ./.github/actions/build_and_test_ya
with:
build_preset: ${{ matrix.build_preset }}
build_target: "ydb/apps/ydbd"
increment: false
run_tests: false
put_build_results_to_cache: false
secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
secrets.TESTMO_TOKEN2, 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 ) }}
- name: Setup s3cmd
uses: ./.github/actions/s3cmd
with:
s3_bucket: "ydb-builds"
s3_endpoint: ${{ vars.AWS_ENDPOINT }}
s3_key_id: ${{ secrets.AWS_KEY_ID }}
s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}

- name: sync results to s3 and publish links
shell: bash
run: |
set -x
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "ydb/apps/ydbd/ydbd" "s3://ydb-builds/${{ github.ref_name }}/${{ matrix.build_preset }}/ydbd" -d
Loading