fix duplicate line merges #708
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit: | |
| concurrency: | |
| group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.compiler }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [clang, gcc] | |
| env: | |
| OS: ubuntu-22.04 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout PR | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha != '' | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha == '' | |
| with: | |
| submodules: true | |
| - name: Prepare ccache timestamp | |
| id: ccache_cache_timestamp | |
| shell: cmake -P {0} | |
| run: | | |
| string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | |
| message("::set-output name=timestamp::${current_date}") | |
| - name: Restore cache files | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ubuntu-22.04-ccache-${{ matrix.compiler }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
| restore-keys: | | |
| ubuntu-22.04-ccache-${{ matrix.compiler }}- | |
| - name: Install dependencies | |
| uses: ./.github/actions/prepare_vm | |
| - name: Build | |
| uses: ./.github/actions/build | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| - name: Test | |
| shell: bash | |
| run: | | |
| ctest -j$(nproc) --preset unit | |
| integration: | |
| concurrency: | |
| group: integration-${{ github.ref }}-${{ matrix.ydb-version }}-${{ matrix.compiler }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ydb-version: [24.1, 24.2, 24.3, 24.4, 25.1, trunk] | |
| compiler: [clang, gcc] | |
| services: | |
| ydb: | |
| image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
| ports: | |
| - 2135:2135 | |
| - 2136:2136 | |
| - 8765:8765 | |
| volumes: | |
| - /tmp/ydb_certs:/ydb_certs | |
| env: | |
| YDB_LOCAL_SURVIVE_RESTART: true | |
| YDB_USE_IN_MEMORY_PDISKS: true | |
| YDB_TABLE_ENABLE_PREPARED_DDL: true | |
| options: '-h localhost' | |
| steps: | |
| - name: Checkout PR | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha != '' | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha == '' | |
| with: | |
| submodules: true | |
| - name: Prepare ccache timestamp | |
| id: ccache_cache_timestamp | |
| shell: cmake -P {0} | |
| run: | | |
| string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | |
| message("::set-output name=timestamp::${current_date}") | |
| - name: Restore cache files | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ubuntu-22.04-ccache-${{ matrix.compiler }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
| restore-keys: | | |
| ubuntu-22.04-ccache-${{ matrix.compiler }}- | |
| - name: Install dependencies | |
| uses: ./.github/actions/prepare_vm | |
| - name: Build | |
| uses: ./.github/actions/build | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| - name: Test | |
| shell: bash | |
| run: | | |
| YDB_VERSION=${{ matrix.ydb-version }} ctest -j2 --preset integration | |
| test-install: | |
| name: "Test CMake Install" | |
| concurrency: | |
| group: test-install-${{ github.ref }}-${{ matrix.compiler }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [clang, gcc] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout PR | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha != '' | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha == '' | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| uses: ./.github/actions/prepare_vm | |
| - name: Prepare ccache timestamp | |
| id: ccache_cache_timestamp | |
| shell: cmake -P {0} | |
| run: | | |
| string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | |
| message("::set-output name=timestamp::${current_date}") | |
| - name: Restore cache files | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache-${{ matrix.compiler }}- | |
| - name: Build and Install SDK | |
| shell: bash | |
| run: | | |
| mkdir build | |
| cmake --preset release-${{ matrix.compiler }} -D YDB_SDK_INSTALL=On | |
| cmake --build --preset default | |
| cmake --install build --prefix ./_install | |
| - name: Verify Installation | |
| shell: bash | |
| run: | | |
| echo "Installation directory content for ${{ matrix.compiler }}:" | |
| ls -R ./_install | |
| if [ -z "$(ls -A ./_install)" ]; then | |
| echo "Error: Installation directory is empty!" | |
| exit 1 | |
| fi | |
| deb-packages: | |
| name: "Test Debian Packages" | |
| concurrency: | |
| group: deb-packages-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout PR | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha != '' | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| if: github.event.pull_request.head.sha == '' | |
| with: | |
| submodules: true | |
| - name: Validate dpkg-buildpackage | |
| shell: bash | |
| run: | | |
| ./scripts/test_dpkg_buildpackage.sh | |
| - name: Build CPack .deb packages | |
| shell: bash | |
| run: | | |
| docker run --rm --network host \ | |
| -v "$PWD:/source" \ | |
| ubuntu:24.04 \ | |
| bash -c ' | |
| set -e | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| pkg-config \ | |
| git \ | |
| libidn11-dev \ | |
| libssl-dev \ | |
| zlib1g-dev \ | |
| libprotobuf-dev \ | |
| protobuf-compiler \ | |
| libgrpc++-dev \ | |
| protobuf-compiler-grpc \ | |
| libbrotli-dev \ | |
| liblz4-dev \ | |
| libzstd-dev \ | |
| libbz2-dev \ | |
| libxxhash-dev \ | |
| libsnappy-dev \ | |
| libdouble-conversion-dev \ | |
| libgtest-dev \ | |
| libre2-dev \ | |
| libc-ares-dev \ | |
| rapidjson-dev \ | |
| python3 \ | |
| python3-six \ | |
| ragel \ | |
| yasm | |
| cd /source | |
| cmake -S scripts/googleapis_deb -B build_googleapis_deb -DCMAKE_INSTALL_PREFIX=/usr/share/yandex | |
| cmake --build build_googleapis_deb -j$(nproc) | |
| cmake --build build_googleapis_deb --target package | |
| dpkg -i build_googleapis_deb/*.deb | |
| ./scripts/generate-debian-directory.sh | |
| cmake -S . -B build-deb \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DYDB_SDK_INSTALL=ON \ | |
| -DYDB_SDK_EXAMPLES=OFF \ | |
| -DYDB_SDK_TESTS=OFF \ | |
| -DYDB_SDK_ENABLE_OTEL_METRICS=ON \ | |
| -DYDB_SDK_ENABLE_OTEL_TRACE=ON \ | |
| -DBUILD_SHARED_LIBS=OFF \ | |
| -DYDB_SDK_USE_SYSTEM_GOOGLEAPIS=ON \ | |
| -DCMAKE_INSTALL_PREFIX=/usr/share/yandex \ | |
| -DCMAKE_PREFIX_PATH="/usr/share/yandex" | |
| cmake --build build-deb --target package -j$(nproc) | |
| cp build_googleapis_deb/*.deb build-deb/ | |
| ' | |
| - name: Smoke-test generated .deb packages | |
| shell: bash | |
| run: | | |
| ./scripts/test_deb_packages.sh build-deb |