@@ -128,27 +128,6 @@ jobs:
128
128
--cxxstd 17,20 \
129
129
--variant debug,release
130
130
131
- build-redis-container :
132
- name : Build Redis container
133
- runs-on : ubuntu-latest
134
- steps :
135
- - name : Checkout
136
- uses : actions/checkout@v4
137
-
138
- - name : Log in to the Container registry
139
- uses : docker/login-action@v2
140
- with :
141
- registry : ghcr.io
142
- username : ${{ github.actor }}
143
- password : ${{ secrets.GITHUB_TOKEN }}
144
-
145
- - name : Build and push
146
- uses : docker/build-push-action@v4
147
- with :
148
- context : tools
149
- push : true
150
- tags : ghcr.io/${{ github.repository }}:latest
151
-
152
131
posix-cmake :
153
132
name : " CMake ${{ matrix.toolset }} ${{ matrix.cxxstd }} ${{ matrix.build-type }} ${{ matrix.cxxflags }}"
154
133
needs : build-redis-container
@@ -227,22 +206,26 @@ jobs:
227
206
ldflags : ' -lc++'
228
207
229
208
runs-on : ${{ matrix.os }}
230
- container : ${{matrix.container}}
209
+ # container: ${{matrix.container}}
231
210
env :
232
211
CXXFLAGS : ${{matrix.cxxflags}} -Wall -Wextra
233
212
LDFLAGS : ${{matrix.ldflags}}
234
213
CMAKE_BUILD_PARALLEL_LEVEL : 4
235
214
BOOST_REDIS_TEST_SERVER : redis
236
215
237
- services :
238
- redis :
239
- image : ghcr.io/${{ github.repository }}:latest
240
-
241
216
steps :
217
+ - name : Checkout
218
+ uses : actions/checkout@v4
219
+
220
+ - name : Set up the required containers
221
+ run : |
222
+ cd tools
223
+ docker compose up -d --wait || (docker compose logs; exit 1)
224
+
242
225
- name : Install dependencies
243
226
run : |
244
- apt-get update
245
- apt-get -y --no-install-recommends install \
227
+ docker exec -it builder apt-get update
228
+ docker exec -it builder apt-get -y --no-install-recommends install \
246
229
git \
247
230
libssl-dev \
248
231
make \
@@ -251,59 +234,51 @@ jobs:
251
234
protobuf-compiler \
252
235
python3 \
253
236
${{ matrix.install }}
254
-
255
- - name : Checkout
256
- uses : actions/checkout@v4
257
-
258
- - name : Set up a Redis server
259
- run : |
260
- cd tools
261
- docker compose up -d --wait || (docker compose logs; exit 1)
262
237
263
238
- name : Setup Boost
264
- run : ./ tools/ci.py setup-boost --source-dir=$(pwd)
239
+ run : docker exec -it builder /boost-redis/ tools/ci.py setup-boost --source-dir=/boost-redis
265
240
266
241
- name : Build a Boost distribution using B2
267
242
run : |
268
- . /tools/ci.py build-b2-distro \
243
+ docker exec -it builder /boost-redis /tools/ci.py build-b2-distro \
269
244
--toolset ${{ matrix.toolset }}
270
245
271
246
- name : Build a Boost distribution using CMake
272
247
run : |
273
- . /tools/ci.py build-cmake-distro \
248
+ docker exec -it builder /boost-redis /tools/ci.py build-cmake-distro \
274
249
--build-type ${{ matrix.build-type }} \
275
250
--cxxstd ${{ matrix.cxxstd }} \
276
251
--toolset ${{ matrix.toolset }}
277
252
278
253
- name : Build the project tests
279
254
run : |
280
- . /tools/ci.py build-cmake-standalone-tests \
255
+ docker exec -it builder /boost-redis /tools/ci.py build-cmake-standalone-tests \
281
256
--build-type ${{ matrix.build-type }} \
282
257
--cxxstd ${{ matrix.cxxstd }} \
283
258
--toolset ${{ matrix.toolset }}
284
259
285
260
- name : Run the project tests
286
261
run : |
287
- . /tools/ci.py run-cmake-standalone-tests \
262
+ docker exec -it builder /boost-redis /tools/ci.py run-cmake-standalone-tests \
288
263
--build-type ${{ matrix.build-type }}
289
264
290
265
- name : Run add_subdirectory tests
291
266
run : |
292
- . /tools/ci.py run-cmake-add-subdirectory-tests \
267
+ docker exec -it builder /boost-redis /tools/ci.py run-cmake-add-subdirectory-tests \
293
268
--build-type ${{ matrix.build-type }} \
294
269
--cxxstd ${{ matrix.cxxstd }} \
295
270
--toolset ${{ matrix.toolset }}
296
271
297
272
- name : Run find_package tests with the built cmake distribution
298
273
run : |
299
- . /tools/ci.py run-cmake-find-package-tests \
274
+ docker exec -it builder /boost-redis /tools/ci.py run-cmake-find-package-tests \
300
275
--build-type ${{ matrix.build-type }} \
301
276
--cxxstd ${{ matrix.cxxstd }} \
302
277
--toolset ${{ matrix.toolset }}
303
278
304
279
- name : Run find_package tests with the built b2 distribution
305
280
run : |
306
- . /tools/ci.py run-cmake-b2-find-package-tests \
281
+ docker exec -it builder /boost-redis /tools/ci.py run-cmake-b2-find-package-tests \
307
282
--build-type ${{ matrix.build-type }} \
308
283
--cxxstd ${{ matrix.cxxstd }} \
309
284
--toolset ${{ matrix.toolset }}
0 commit comments