nightly_build.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. - name: sync results to s3 and publish links
  50. shell: bash
  51. run: |
  52. set -x
  53. 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