1
1
name : Nightly-Build # workflow used to upload built binaries to s3
2
2
on :
3
+ schedule :
4
+ - cron : " 0 3 * * *" # At 03:00 every day
3
5
workflow_dispatch :
4
6
inputs :
5
- runner_label :
6
- type : string
7
- default : " auto-provisioned"
8
- description : " runner label"
9
- commit_sha :
10
- type : string
11
- default : " "
7
+ use_default_branches :
8
+ description : ' If true, run on main and all current stable branches. If false, run only on the current branch.'
9
+ type : boolean
10
+ required : false
11
+ default : true
12
+
12
13
jobs :
14
+ determine_branches :
15
+ runs-on : ubuntu-latest
16
+ outputs :
17
+ branches : ${{ steps.set-branches.outputs.branches }}
18
+ steps :
19
+ - id : set-branches
20
+ run : |
21
+ if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.use_default_branches }}" == "true" ]]; then
22
+ echo "branches=['main', 'stable-25-1', 'stable-24-4', 'stable-25-1-1', 'stable-25-1-analytics']" >> $GITHUB_OUTPUT
23
+ else
24
+ echo "branches=['${{ github.ref_name }}']" >> $GITHUB_OUTPUT
25
+ fi
26
+
13
27
build_and_test :
28
+ needs : determine_branches
14
29
strategy :
15
30
fail-fast : false
16
31
matrix :
17
32
build_preset : ["release", "relwithdebinfo", "release-asan"]
33
+ branch : ${{ fromJSON(needs.determine_branches.outputs.branches) }}
18
34
runs-on : [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', matrix.build_preset) }}" ]
19
- name : Build and test ${{ matrix.build_preset }}
35
+ name : Build and test ${{ matrix.build_preset }} on ${{ matrix.branch }}
20
36
steps :
21
37
- name : Checkout
22
38
uses : actions/checkout@v4
23
39
with :
24
- ref : ${{ inputs.commit_sha }}
40
+ ref : ${{ matrix.branch }}
25
41
fetch-depth : 2
26
42
- name : Setup ydb access
27
43
uses : ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
51
67
shell : bash
52
68
run : |
53
69
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
70
+ s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "ydb/apps/ydbd/ydbd" "s3://ydb-builds/${{ matrix.branch }}/${{ matrix.build_preset }}/ydbd" -d
0 commit comments