Skip to content
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
3 changes: 1 addition & 2 deletions .devcontainer/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ services:
- ../:/workspaces/ydb-cpp-sdk:cached

environment:
- YDB_VERSION=24.3
- YDB_CONNECTION_STRING=grpc://ydb:2136/local
- YDB_CONNECTION_STRING_SECURE=grpcs://ydb:2135/local
- YDB_ANONYMOUS_CREDENTIALS=1
Expand All @@ -36,7 +35,7 @@ services:
# (Adding the "ports" property to this file will not forward from a Codespace.)

ydb:
image: ghcr.io/ydb-platform/local-ydb:24.3
image: ydbplatform/local-ydb:26.2
restart: unless-stopped
hostname: ydb
platform: linux/amd64
Expand Down
44 changes: 34 additions & 10 deletions .github/actions/build_windows/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
name: Build Windows SDK
description: Build the SDK, examples, and selected unit tests with clang-cl

inputs:
configure-args:
description: Additional CMake configure arguments, one per line
default: ""
build-targets:
description: Build targets separated by whitespace
default: ""
post-build-script:
description: PowerShell script to run in the build environment
default: ""

runs:
using: composite
steps:
Expand Down Expand Up @@ -39,8 +50,14 @@ runs:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.cache/ccache
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cache/cpm
YDB_CONFIGURE_ARGS: ${{ inputs.configure-args }}
YDB_BUILD_TARGETS: ${{ inputs.build-targets }}
YDB_POST_BUILD_SCRIPT: ${{ inputs.post-build-script }}
run: |
$PSNativeCommandUseErrorActionPreference = $true
# The Visual Studio shell reloads environment variables through cmd.
$configureArgs = @($env:YDB_CONFIGURE_ARGS -split '\r?\n' | Where-Object { $_ })
$buildTargets = @($env:YDB_BUILD_TARGETS -split '\s+' | Where-Object { $_ })
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vs = & $vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
& "$vs\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64 -HostArch amd64 -SkipAutomaticLocation
Expand All @@ -59,17 +76,24 @@ runs:
"-DCMAKE_C_COMPILER=$compiler" -DCMAKE_BUILD_TYPE=Release "-DLIBIDN_SOURCE_DIR=$libidn"
cmake --build .cache/libidn --parallel

# Start with unit suites that build and run on Windows.
$unitTargets = @(
'client-connection_string_ut', 'client-embedding_ut', 'client-params_ut',
'client-result_ut', 'client-value_ut', 'operation_id_ut', 'time_ut',
'yql-public-decimal_ut', 'yql-public-issue_ut'
)
if ($buildTargets.Count -eq 0) {
$unitTargets = @(
'client-connection_string_ut', 'client-embedding_ut', 'client-params_ut',
'client-result_ut', 'client-value_ut', 'operation_id_ut', 'time_ut',
'yql-public-decimal_ut', 'yql-public-issue_ut'
)
$configureArgs += '-DYDB_SDK_TESTS=ON', "-DYDB_SDK_TEST_TARGETS=$($unitTargets -join ';')"
$buildTargets = @('src/all', 'examples/all') + $unitTargets
}
ccache --zero-stats
cmake --preset base -DCMAKE_BUILD_TYPE=Release -DYDB_SDK_TESTS=ON `
cmake --preset base -DCMAKE_BUILD_TYPE=Release `
"-DCMAKE_C_COMPILER=$compiler" "-DCMAKE_CXX_COMPILER=$compiler" `
"-DYDB_SDK_TEST_TARGETS=$($unitTargets -join ';')" `
"-DCMAKE_PREFIX_PATH=$prefix" "-DOPENSSL_ROOT_DIR=$prefix" `
"-DIDN_INCLUDE_DIR=$libidn/lib" "-DIDN_LIBRARIES=$workspace/.cache/libidn/idn.lib"
cmake --build --preset default --target src/all examples/all @unitTargets --parallel
"-DIDN_INCLUDE_DIR=$libidn/lib" "-DIDN_LIBRARIES=$workspace/.cache/libidn/idn.lib" @configureArgs
cmake --build --preset default --target @buildTargets --parallel
ccache --show-stats
if ($env:YDB_POST_BUILD_SCRIPT) {
$env:YDB_WINDOWS_COMPILER = $compiler
$env:YDB_WINDOWS_VCPKG_PREFIX = $prefix
& $env:YDB_POST_BUILD_SCRIPT
}
13 changes: 7 additions & 6 deletions .github/scripts/run_iam_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ cleanup_iam() {

wait_for_iam_ydb() {
for _ in $(seq 1 "${IAM_READY_ATTEMPTS}"); do
if docker exec -e "YDB_TOKEN=${IAM_TOKEN}" "${IAM_CONTAINER_NAME}" /ydb \
--endpoint grpc://localhost:2136 \
--database /local \
sql -s 'select 1' >/dev/null 2>&1; then
if docker exec -e "YDB_TOKEN=${IAM_TOKEN}" "${IAM_CONTAINER_NAME}" \
bash /health_check --readiness >/dev/null 2>&1; then
return 0
fi
sleep "${IAM_READY_SLEEP_SECONDS}"
Expand All @@ -33,13 +31,16 @@ trap cleanup_iam EXIT
cleanup_iam

docker run -d --name "${IAM_CONTAINER_NAME}" --hostname localhost \
-p 2235:2135 -p 2236:2136 -p 28765:8765 \
-p 2235:2235 -p 2236:2236 -p 28765:28765 \
-v /tmp/ydb_iam_certs:/ydb_certs \
-e GRPC_TLS_PORT=2235 \
-e GRPC_PORT=2236 \
-e MON_PORT=28765 \
-e YDB_USE_IN_MEMORY_PDISKS=true \
-e YDB_TABLE_ENABLE_PREPARED_DDL=true \
-e YDB_ENFORCE_USER_TOKEN_REQUIREMENT=true \
-e YDB_DEFAULT_CLUSTERADMIN=root@builtin \
ghcr.io/ydb-platform/local-ydb:trunk
"${IAM_YDB_IMAGE:-ghcr.io/ydb-platform/local-ydb:trunk}"

wait_for_iam_ydb

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
id-token: write
services:
ydb:
image: ydbplatform/local-ydb:24.4
image: ydbplatform/local-ydb:trunk
ports:
- 2135:2135
- 2136:2136
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ydb-version: [25.1, trunk]
ydb-version: ["25.2", "25.3", "25.4", "26.1", "26.2", "26.3", trunk]
compiler: [clang, gcc]
services:
ydb:
Expand Down
Loading
Loading