aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/build_and_test_ya.yml
blob: 6d16be296fd3a9c9cbf7c6857971c5fe3a4f899d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Ya-Build-and-Test

on:
  workflow_call:
    inputs:
      build_target:
        type: string
        default: "ydb/"
        description: "limit build and test to specific target"
      sanitizer:
        type: string
        default: "none"
        description: "sanitizer type"
      runner_kind:
        type: string
        required: true
        description: "self-hosted or provisioned"
      runner_label:
        type: string
        default: "linux"
        description: "runner label"
      run_build:
        type: boolean
        default: true
        description: "run build"
      run_tests:
        type: boolean
        default: true
        description: "run tests"
      log_suffix:
        type: string
        required: true
        description: "suffix for current build. uses as testmo source and s3 subfolder"


jobs:
  main:
    name: Build and test
    runs-on: [ self-hosted, "${{ inputs.runner_kind }}", "${{ inputs.runner_label }}" ]
    steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: Prepare s3cmd
      uses: ./.github/actions/s3cmd
      with:
        s3_bucket: ${{ vars.AWS_BUCKET }}
        s3_endpoint: ${{ vars.AWS_ENDPOINT }}
        s3_key_id: ${{ secrets.AWS_KEY_ID }}
        s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}
        log_suffix: ${{ inputs.log_suffix }}

    - name: Build
      uses: ./.github/actions/build_ya
      if: inputs.run_build
      with:
        build_target: ${{ inputs.build_target }}
        sanitizer: ${{ inputs.sanitizer }}
        bazel_remote_uri: ${{ vars.REMOTE_CACHE_URL_YA || '' }}
        bazel_remote_username: ${{ secrets.REMOTE_CACHE_USERNAME }}
        bazel_remote_password: ${{ secrets.REMOTE_CACHE_PASSWORD }}

    - name: Run tests
      uses: ./.github/actions/test_ya
      if: inputs.run_tests
      with:
        build_target: ${{ inputs.build_target }}
        sanitizer: ${{ inputs.sanitizer }}
        log_suffix: ${{ inputs.log_suffix }}
        testman_token: ${{ secrets.TESTMO_TOKEN }}
        testman_url: ${{ vars.TESTMO_URL }}
        testman_project_id: ${{ vars.TESTMO_PROJECT_ID }}