@@ -118,3 +118,63 @@ 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+ cmake --preset release-${{ matrix.compiler }} -D YDB_SDK_INSTALL=On
169+ cmake --build --preset default
170+ cmake --install build --prefix ./_install
171+
172+ - name : Verify Installation
173+ shell : bash
174+ run : |
175+ echo "Installation directory content for ${{ matrix.compiler }}:"
176+ ls -R ./_install
177+ if [ -z "$(ls -A ./_install)" ]; then
178+ echo "Error: Installation directory is empty!"
179+ exit 1
180+ fi
0 commit comments