@@ -118,3 +118,65 @@ jobs:
118118 shell : bash
119119 run : |
120120 YDB_VERSION=${{ matrix.ydb-version }} ctest -j2 --preset integration
121+
122+ test-install :
123+ name : " Test CMake Install"
124+ concurrency :
125+ group : test-install-${{ github.ref }}-${{ matrix.compiler }}
126+ cancel-in-progress : true
127+ strategy :
128+ fail-fast : false
129+ matrix :
130+ compiler : [clang, gcc]
131+ runs-on : ubuntu-22.04
132+ steps :
133+ - name : Checkout PR
134+ uses : actions/checkout@v4
135+ if : github.event.pull_request.head.sha != ''
136+ with :
137+ submodules : true
138+ ref : ${{ github.event.pull_request.head.sha }}
139+
140+ - name : Checkout
141+ uses : actions/checkout@v4
142+ if : github.event.pull_request.head.sha == ''
143+ with :
144+ submodules : true
145+
146+ - name : Install dependencies
147+ uses : ./.github/actions/prepare_vm
148+
149+ - name : Prepare ccache timestamp
150+ id : ccache_cache_timestamp
151+ shell : cmake -P {0}
152+ run : |
153+ string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
154+ message("::set-output name=timestamp::${current_date}")
155+
156+ - name : Restore cache files
157+ uses : actions/cache/restore@v4
158+ with :
159+ path : ~/.ccache
160+ key : ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
161+ restore-keys : |
162+ ${{ runner.os }}-ccache-${{ matrix.compiler }}-
163+
164+ - name : Build and Install SDK
165+ shell : bash
166+ run : |
167+ mkdir build
168+ # Используем ${{ matrix.compiler }} для выбора правильного пресета
169+ cmake --preset release-${{ matrix.compiler }} -D YDB_SDK_INSTALL=On
170+ cmake --build --preset default
171+ cmake --install . --prefix ./_install
172+
173+ - name : Verify Installation
174+ shell : bash
175+ run : |
176+ echo "Installation directory content for ${{ matrix.compiler }}:"
177+ ls -R ./_install
178+ # Проверяем, что директория не пуста
179+ if [ -z "$(ls -A ./_install)" ]; then
180+ echo "Error: Installation directory is empty!"
181+ exit 1
182+ fi
0 commit comments