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

Update path_ut.cpp #13

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
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
111 changes: 111 additions & 0 deletions .github/actions/build_and_test_ya /action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Ya-Build-and-Test
inputs:
build_target:
type: string
default: "ydb/"
description: "limit build and test to specific target"
build_preset:
type: string
run_build:
type: boolean
default: true
description: "run build"
run_tests:
type: boolean
default: true
description: "run tests"
test_threads:
type: string
default: 28
description: "Test threads count"
link_threads:
type: string
default: 8
description: "link threads count"
test_size:
type: string
default: "small,medium,large"
test_type:
type: string
default: "unittest,py3test,py2test,pytest"
folder_prefix:
type: string
default: "ya-"
cache_tests:
type: boolean
default: false
description: "Use cache for tests"
put_build_results_to_cache:
type: boolean
default: true
commit_sha:
type: string
default: ""
defaults:
run:
shell: bash
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.commit_sha }}

- name: comment-build-start
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
shell: bash
env:
BUILD_PRESET: ${{ inputs.build_preset }}
GITHUB_TOKEN: ${{ github.token }}
run: |
jobs_url="https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/jobs"
# tricky: we are searching job with name that contains build_preset
check_url=$(curl -s $jobs_url | jq --arg n "$BUILD_PRESET" -r '.jobs[] | select(.name | contains($n)) | .html_url')

echo "Pre-commit [check]($check_url) for ${{ inputs.commit_sha }} has started." | .github/scripts/tests/comment-pr.py --rewrite

- 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 }}
folder_prefix: ya-
build_preset: ${{ inputs.build_preset }}

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

- name: Run tests
uses: ./.github/actions/test_ya
if: inputs.run_tests
with:
build_target: ${{ inputs.build_target }}
build_preset: ${{ inputs.build_preset }}
test_size: ${{ inputs.test_size }}
test_type: ${{ inputs.test_type }}
testman_token: ${{ secrets.TESTMO_TOKEN }}
testman_url: ${{ vars.TESTMO_URL }}
testman_project_id: ${{ vars.TESTMO_PROJECT_ID }}
bazel_remote_uri: ${{ vars.REMOTE_CACHE_URL_YA || '' }}
bazel_remote_username: ${{ inputs.put_build_results_to_cache && secrets.REMOTE_CACHE_USERNAME || '' }}
bazel_remote_password: ${{ inputs.put_build_results_to_cache && secrets.REMOTE_CACHE_PASSWORD || '' }}
link_threads: ${{ inputs.link_threads }}
test_threads: ${{ inputs.test_threads }}

- name: comment-if-cancel
if: cancelled() && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target')
env:
BUILD_PRESET: ${{ inputs.build_preset }}
GITHUB_TOKEN: ${{ github.token }}
run: echo "Check cancelled" | .github/scripts/tests/comment-pr.py --color black
41 changes: 12 additions & 29 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,33 +196,16 @@ jobs:
fail-fast: false
matrix:
build_preset: ["relwithdebinfo", "release-asan"]
runs-on: [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', inputs.build_preset) }}" ]
name: Build and test ${{ matrix.build_preset }}
uses: ./.github/workflows/build_and_test_ya_provisioned.yml
with:
build_preset: ${{ matrix.build_preset }}
build_target: "ydb/"
test_size: "small,medium"
test_type: "unittest,py3test,py2test,pytest"
test_threads: 52
runner_label: auto-provisioned
put_build_results_to_cache: true
commit_sha: ${{ needs.check-running-allowed.outputs.commit_sha }}
secrets: inherit
build:
needs:
- check-running-allowed
if: needs.check-running-allowed.outputs.result == 'true' && needs.check-running-allowed.outputs.commit_sha != ''
strategy:
fail-fast: false
matrix:
build_preset: ["release-cmake14"]
name: Build and test ${{ matrix.build_preset }}
uses: ./.github/workflows/build_and_test_ya_provisioned.yml
with:
build_preset: ${{ matrix.build_preset }}
build_target: "ydb/"
run_tests: false
runner_label: auto-provisioned
put_build_results_to_cache: true
commit_sha: ${{ needs.check-running-allowed.outputs.commit_sha }}
secrets: inherit
steps:
- name: Build and test
uses: ./.github/actions/build_and_test_ya
with:
build_preset: ${{ matrix.build_preset }}
build_target: "ydb/"
test_size: "small,medium"
test_type: "unittest,py3test,py2test,pytest"
test_threads: 52
put_build_results_to_cache: true
commit_sha: ${{ needs.check-running-allowed.outputs.commit_sha }}
1 change: 1 addition & 0 deletions ydb/core/base/ut/path_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "path.h"
#
#include <library/cpp/testing/unittest/registar.h>

#include <array>
Expand Down
Loading