Skip to content

Commit 13f3018

Browse files
authored
Merge 938d65c into 97ff008
2 parents 97ff008 + 938d65c commit 13f3018

File tree

2 files changed

+66
-8
lines changed

2 files changed

+66
-8
lines changed

.github/actions/s3cmd/action.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ inputs:
88
required: true
99
description: "s3 key secret"
1010
s3_bucket:
11-
required: true
11+
required: false
1212
description: "s3 bucket"
1313
s3_endpoint:
1414
required: true
1515
description: "s3 endpoint"
1616
folder_prefix:
17-
required: true
17+
required: false
1818
description: "folder prefix"
1919
build_preset:
20-
required: true
20+
required: false
2121
description: "build preset like relwithdebinfo"
2222
runs:
2323
using: "composite"
@@ -35,7 +35,14 @@ runs:
3535
host_base = storage.yandexcloud.net
3636
host_bucket = %(bucket)s.storage.yandexcloud.net
3737
EOF
38-
38+
env:
39+
s3_key_id: ${{ inputs.s3_key_id }}
40+
s3_secret_access_key: ${{ inputs.s3_key_secret }}
41+
42+
- name: export s3 path variables
43+
shell: bash
44+
if: inputs.build_preset
45+
run: |
3946
folder="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"
4047
4148
BUILD_PRESET="${{ inputs.build_preset }}"
@@ -57,7 +64,4 @@ runs:
5764
echo "S3_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
5865
echo "S3_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
5966
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
60-
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
61-
env:
62-
s3_key_id: ${{ inputs.s3_key_id }}
63-
s3_secret_access_key: ${{ inputs.s3_key_secret }}
67+
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

.github/workflows/nightly_build.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Nightly-Build # workflow used to upload built binaries to s3
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
runner_label:
6+
type: string
7+
default: "auto-provisioned"
8+
description: "runner label"
9+
commit_sha:
10+
type: string
11+
default: ""
12+
jobs:
13+
build_and_test:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
build_preset: ["relwithdebinfo", "release-asan"]
18+
runs-on: [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', matrix.build_preset) }}" ]
19+
name: Build and test ${{ matrix.build_preset }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ inputs.commit_sha }}
25+
fetch-depth: 2
26+
- name: Setup ydb access
27+
uses: ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
28+
with:
29+
ci_ydb_service_account_key_file_credentials: ${{ secrets.CI_YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS }}
30+
- name: Build and test
31+
uses: ./.github/actions/build_and_test_ya
32+
with:
33+
build_preset: ${{ matrix.build_preset }}
34+
build_target: "ydb/apps/ydbd"
35+
increment: false
36+
run_tests: false
37+
put_build_results_to_cache: false
38+
secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
39+
secrets.TESTMO_TOKEN2, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
40+
vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
41+
vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}
42+
- name: Setup s3cmd
43+
uses: ./.github/actions/s3cmd
44+
with:
45+
s3_bucket: "ydb-builds"
46+
s3_endpoint: ${{ vars.AWS_ENDPOINT }}
47+
s3_key_id: ${{ secrets.AWS_KEY_ID }}
48+
s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}
49+
50+
- name: sync results to s3 and publish links
51+
shell: bash
52+
run: |
53+
set -x
54+
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

0 commit comments

Comments
 (0)